AI & XML / Comparative study of PDF-to-AI converters / Structure of the test document 7 Structure of the test document

The following pages describe each component of the test document and explain its importance for assessing converters and AI-assisted processing systems. The selected content reflects typical scientific, technical and business document requirements, covering structural and typographic features.

Chapter selection tests whether tools capture complex structures completely and semantically correctly. Each chapter also explains how incomplete or semantically incorrect processing affects chunking, retrieval, knowledge extraction and RAG. Descriptions therefore cover both test content and its relevance to structured processing and AI workflows.

7.1 Headings, document structure and page layout

The first chapter tests reliable recognition and assignment of chapter boundaries and heading levels. This is essential for hierarchical RAG chunking: first chapters or subchapters, then paragraphs or sentences within them. Headings must remain available as anchors. Without them, section boundaries cannot be determined safely, preventing clean, reproducible chapter-based chunking.

RAG aims to find exactly the sections supplying context for a query. Headings label a section’s topic before its content, helping retrieval classify information quickly and accurately. Preserved as structural metadata, they allow chunks to be evaluated by both text and position in the hierarchy. Queries can target relevant chapters and subchapters, increasing suitable matches and reducing irrelevant results.

Missing or incorrect heading levels prevent chunking along logical divisions. Arbitrary cuts or oversized chunks then mix topics, harming retrieval and answers because context becomes unclear.

The chapter also examines page elements outside running text: page numbers, running heads and overall structure. RAG must exclude them from content while retaining their structural and pagination information for context, references and citations.

The running heads recur on each page or spread, usually giving document title, chapter name or both. They orient human readers and are not independent content. Parsing them as text creates artificial repetitions that distort structure. RAG may mistake frequent headings for relevant passages. This test checks identification and consistent removal from running text without losing genuine structure.

Closely related is page numbering. Page numbers are layout metadata, not content. They must stay out of extracted text where they are meaningless or disruptive, but mark page transitions and physical structure. Capturing them separately supports clean downstream processing.

Printed page numbering differs from the PDF page index. Scientific publications often start printed numbering after title, preface or contents, using Roman numerals in front matter and Arabic in the body. PDF indexing instead counts every physical page from the file’s first page.

Distinguishing them is essential for scientific citation: references normally cite printed numbers. Without this distinction, systems cannot cite correct pages or identify passages uniquely. The test checks recognition and separate capture of both without inserting them into text flow.

The document uses running chapter heads throughout, changing with structure. Printed numbering deliberately starts after the contents through section breaks, modeling real scientific publications with multiple numbering schemes.

Overall, this chapter tests separation of layout and document logic: content, structural metadata and page-break information must remain distinct. Results indicate suitability for demanding RAG workflows where citation, references and structural integrity are central.

7.2 Text emphasis and inline formatting

Chapter two examines recognition, preservation and structural interpretation of running-text typography. Typography conveys semantic, structural and reference information beyond appearance, affecting RAG chunking, retrieval and answers. The test systematically investigates reliable capture and preservation through transformations.

Scientific, technical and legal texts intentionally use italics for quotations, foreign terms or concepts, bold for key terms, names or normative statements, and underlining for emphasis or editing. Such conventions are not random. Ignoring or simplifying typography loses semantic structure relevant to precise machine processing.

Typography indirectly supports chunking. Though chunks follow chapters or paragraphs, emphasized text can mark semantic focus within them. A bold keyword changes the topical significance of an otherwise equally long chunk. Preserved emphasis can inform retrieval weighting or later annotation.

Particular attention goes to superscripts and subscripts. These are not merely smaller characters: they often fundamentally alter meaning. Chemical formulas such as H2O, square-kilometer units and mathematical powers become semantically wrong without correct positioning. Flattening or ignoring subscripts yields readable-looking but incorrect content, undermining retrieval and answers.

Superscripts also mark footnote references: raised numbers or symbols connect text to distant explanations or evidence. If not recognized as references, the text becomes isolated and notes lose anchors.

RAG needs these links because notes contain sources, definitions, limitations and supporting arguments. Correctly linked notes may share a chunk, become separate linked chunks or be retrieved contextually. Every strategy requires identifiable superscript anchors.

The test systematically embeds bold, italic, underlined, struck-through, superscript and subscript text, including combinations such as bold italic or bold underlined italic. All occur inside complete sentences, testing contextual recognition rather than isolated samples.

7.3 Special characters, numbers and fonts

This chapter tests character integrity in extraction and transformation, whether using digital PDF parsing or OCR. Individual character accuracy underpins semantics; even small errors can cause major distortions amplified by downstream RAG.

Robustness to typographic and font problems is systematically tested using many special characters such as §, =, &, #, $, €, ©, ®, @ and typographic quotes, plus error-prone fractions ¼, ½ and ¾. The security code “739#46215$8€3*” tests complete, exact capture of a long mixed number/symbol sequence.

A familiar recognition problem is confusion of visually similar characters. Depending on font, style and quality, letters and digits may be nearly indistinguishable. The digit 1 can be confused with I, T or even J. Beyond spelling, this corrupts values, identifiers, legal references and technical names. Repeated 1, I and T examples expose common confusions.

Character accuracy is central to character/token-based retrieval. One mistake may hide relevant passages or associate them wrongly, especially identifiers, formulas, standard names and reference numbers. The test checks stable recognition under difficult typography.

Deliberately fictional nonsense minimizes contextual correction by language models. Technical extraction accuracy alone matters. The text covers as many keyboard letters, numbers, symbols and punctuation marks as possible, including rare or complex characters.

To represent different fonts, the same text repeats in two or three monospaced, serif and sans-serif fonts, each regular, italic and bold. Besides recognition, this tests font/style changes, paragraphs and lines, distinguishing content-only from typographically accurate conversion.

This controlled scenario models typical character/font failures and reveals systematic distortion or robustness. It matters to overall RAG suitability because character errors undermine all later stages.

7.4 Multiple columns

This chapter tests recognition of multicolumn layouts and reconstruction of coherent reading order, common in science and technical manuals. Humans follow it intuitively, but automated analysis faces substantial difficulty.

Wrongly merged columns swap sentences or paragraphs, producing incomprehensible chunks and poor retrieval. Semantic or hierarchical chunking particularly suffers because the structure itself is destroyed.

A long text runs through three columns and is coherent only in correct reading order. Tools must extract it accordingly. The test also checks whether column breaks, line breaks and hyphenation leak into output or paragraph structure is lost.

7.5 Footnotes, endnotes, citations and bibliography

Referenced content outside immediate text supplies essential context and evidence. Footnotes, endnotes, citations and bibliography form a reference system; RAG must capture it to trace sources and provide scientifically sound answers.

Footnotes are spatially separate but semantically close. Raised markers sit in text, while notes sit at page bottom. Separation must not break meaning: isolated notes lose context, and text without notes is incomplete. This test checks correct structural mapping of links.

Similar requirements apply to endnotes. These collect at chapter or document end instead of page bottom. Markers work like footnotes, but greater distance increases RAG association difficulty. Endnotes must be recognized, linked and distinguished from ordinary text.

Special importance also attaches to the bibliography. Entries are structured author, title, year, publisher or source records. RAG needs them for targeted literature queries, citation and links to claims. Unstructured blocks make these queries unreliable or impractical.

The test checks both bibliography recognition and separation of entries with identifiable components. Conventional scientific styles provide at least author, title, year and publisher/source, testing typical reference pattern recognition.

Notes must not flow uncontrolled into ordinary chunks, changing topic focus, yet must remain retrievable with links to text. Bibliographies likewise often need separate chunks for targeted searches.

A dedicated chapter contains footnote calls, endnote calls collected at document end, citations and a separate final bibliography with four or five valid entries. It assesses references as integral document logic usable by RAG, beyond mere detection.

7.6 Multilingual content

Scientific, cultural and technical documents mix Latin with other writing systems. This chapter tests preserving those passages without loss or distortion during recognition and processing.

The aim is reliable handling of non-Latin systems, especially those structurally or directionally unlike Latin alphabets. Hebrew and Arabic texts run right to left with distinct typographic and linguistic properties. Latin-optimized tools often struggle with order, segmentation or linear display. The test checks correct recognition, direction and coherent text preservation.

Incorrectly recognized languages cannot be searched or cited. Wrong encoding or direction can leave technically present but unusable content. This chapter checks non-Latin text receives treatment equivalent to Latin text.

A dedicated chapter repeats a short German passage in Hebrew, Arabic, Greek and Chinese, focusing on characters and direction. These are real text, not embedded images, ensuring ordinary text processing rather than image analysis.

Results indicate whether multilingual content is handled as integral document information and whether tools suit international, interdisciplinary and cross-cultural RAG workflows with mixed scripts.

7.7 Images, charts and diagrams

This chapter examines recognition, referencing and content analysis of images and graphics. In many scientific and technical documents, images are independent information sources rather than merely illustrations. They contain structured content, explanations or even complete data presentations essential to understanding the text. RAG systems must therefore recognize images as independent objects, reference them correctly and access their content.

A fundamental aspect of this test is unambiguous identification of images as non-textual elements. Images must not be treated as decorative layout components or ignored entirely. They must be captured as independent document objects referenceable through metadata. This is important because images can serve as sources in RAG workflows. A system must be able to reference a specific image, for example to display it in an answer, link to it or use it as evidence for a statement.

Many images also contain text relevant to search and retrieval. Labels, axis titles, legends or explanatory text inside graphics often convey essential content not repeated in the body text. If this text is not recognized, a substantial part of the information remains invisible to the RAG system. This chapter tests whether embedded image text can be recognized reliably and made searchable.

Images containing complex structures pose a particular challenge. Examples include tables, diagrams or schematic representations with clear relational information. If a table appears within an image, for example, linear extraction of the image text is insufficient. Ideally, the table should be recognized and structurally captured so its content can be interpreted and queried correctly. This test examines whether systems distinguish purely decorative graphics from images with structured content.

Another aspect is the use of alternative text. Authors often deliberately provide alternative text to describe image content, for accessibility or search engine optimization, for example. Such text often contains condensed summaries or conceptual descriptions of what is shown. Any existing alternative text should therefore be captured and integrated into the image’s semantic representation. It can provide RAG systems with a valuable additional information source, especially when visual interpretation of the image itself is complex.

This chapter’s test setup includes several image types: embedded images, charts or diagrams, and graphics with embedded text. All images contain relevant text elements such as labels, axis titles or explanatory notes within the graphic. This text is not repeated in the body text, ensuring that recognition depends exclusively on image processing.

Overall, this chapter tests correct processing of images in their dual role as visual and semantic information sources. The results indicate whether a system suits RAG workflows in which multimodal content must be displayed, understood and made referenceable.

7.8 Tables

Tables play a central role in scientific and technical documents because they organize information relationally rather than merely linearly. Unlike body text, table meaning arises from the combination of rows, columns and their headings. This structure is particularly valuable to RAG systems, providing precise, verifiable statements directly usable for retrieval, comparison and factual answers. This chapter tests how well the converters recognize tables as semantic structures and correctly convert them into machine-readable representations.

A fundamental challenge in table processing is reliable identification of table headers. Headers define the semantic role of individual columns or column groups and are essential to understanding their data. In practice, headers often comprise several stacked rows with a combined hierarchical meaning rather than a single row. Failure to recognize these rows as one unit loses the table’s semantic structure. Column content can then no longer be interpreted unambiguously or linked to its attributes.

Another central problem is header repetition in multipage tables. Long tables often continue across page breaks, repeating their header on each new page. This improves readability and comprehension but challenges automatic processing. A system must recognize the same table and avoid treating repeated headers as new tables or extra data rows. A multipage table with repeated headers tests whether these repetitions can be suppressed correctly and merged into a consistent, continuous table structure.

This chapter also pays particular attention to recognizing horizontal and vertical spans in tables. Row and column spans logically group content or represent hierarchical relationships within a table. A spanning cell may indicate that several columns share a category or that an entry covers several rows. Failure to recognize this information loses important semantic relationships. The table survives formally, but its content is represented inaccurately or incompletely.

This directly affects RAG systems. Correctly structured tables support targeted queries about attributes, value ranges or relationships. Incorrect table structures produce imprecise or wrong retrieval results. Representation quality also determines whether table content can be processed as independent chunks or becomes mixed with body text and unusable.

The test therefore groups several table types in a dedicated document section. First come simple tables without spans, with clear rows and columns and complete borders. These establish a baseline for reliable recognition of basic structure. Complex tables with row and column spans then require more differentiated semantic interpretation. The chapter also contains a table deliberately longer than one page, continuing on the following two pages with a repeating header. This tests correct handling of page breaks, table continuation and consistent header assignment. Finally, various tables without borders test structural recognition without visible lines. Overall, the chapter assesses whether tools process tables as essential semantic structures for RAG workflows as well as visual elements.

7.9 Lists and enumerations

Lists and enumerations are important structural devices in scientific, technical and especially legal texts. Beyond readability, they establish semantic relationships between information. Lists often define conditions, prerequisites, sequences or facts of equal standing. RAG systems must recognize lists rather than flatten them into body text. This chapter tests whether tools reliably recognize list structures and correctly convert them into structured representations.

Unlike body text, lists have an explicit internal order, which can be numeric, alphabetic or purely symbolic and conveys meaning. Numbered lists often express a fixed order or logical sequence. Alphabetic lists often systematically organize complex matters. Unnumbered lists usually indicate aspects or examples of equal standing. Losing this structure flattens the content and makes machine interpretation harder.

Because numbered main items often combine with subordinate alphabetic or symbolic items in practice, correct recognition of mixed lists is particularly important. Hierarchies in lists with mixed markers express dependencies and subordination and therefore carry semantic meaning. For RAG chunking, this hierarchy determines which text parts belong together and which can be treated as independent units.

Legal texts use a particular structural device: enumerations often appear as marginal numbers or paragraph labels rather than conventional lists. These numbers serve a similar role to list items despite their different typography. They structure arguments, identify exact passages and enable precise references. Systems that miss these structures incorrectly treat legal texts as homogeneous body text, losing essential organizational information.

Nested lists present an additional challenge. Multilevel lists within lists are common in regulations, technical specifications and teaching texts. Each level adds semantic differentiation. Failure to recognize nesting during automatic processing loses relationships between main and subordinate items. RAG systems may then separate related information or process unrelated items together.

The test therefore includes realistic forms: simple bulleted lists, numbered lists, lettered lists and mixed lists. It also includes a nested list with at least two levels and a short text with marginal numbers.

Overall, this chapter examines whether lists survive as independent structural units usable in subsequent processing. The results indicate how well the tools suit RAG workflows where structural precision and semantic differentiation are central.

7.10 Mathematical content and formulas

This chapter tests reliable recognition, interpretation and structured representation of mathematical content. Formulas are central meaning carriers in scientific and technical texts. They cannot be treated as ordinary text because their semantics arises from the spatial arrangement of symbols, operators, superscripts and subscripts. RAG systems must therefore recognize mathematical expressions visually and model them correctly in formal terms.

A central aim is converting formulas into standardized machine-readable formats, especially MathML and LaTeX. Both explicitly represent mathematical structure and support further processing, searching and comparison. Extracting a formula only as linear text or an image fragment loses its internal structure. In a RAG context, such content cannot then be interpreted correctly, meaningfully queried or reproduced.

Particular challenges arise with more complex mathematical expressions. These include nested fractions, exponents and indices, sum and product signs, integrals and multiline equations. Meaning depends on relative symbol positions as well as the symbols themselves. Superscripts, subscripts, brackets and alignment must be recognized correctly and represented structurally. Errors immediately produce semantically incorrect formulas.

Correct recognition matters to RAG systems for several reasons. Formulas must be searchable, for example to find documents containing a specific equation or structure. Mathematical expressions may also form part of answers, such as technical explanations or derivations. The system must then reproduce the formula correctly, which requires a structured, normalized underlying representation.

The test includes several formulas both inline and as displayed equations. They vary in complexity and mathematical notation. It tests whether they can be recognized reliably and consistently converted to either MathML or LaTeX, assessing both syntactic correctness and semantic equivalence of the result.

Overall, the chapter examines whether mathematical content is treated as independent semantic objects. The results indicate suitability for RAG workflows requiring reliable processing and reproduction of mathematical arguments, formulas or formal models.

7.11 Text boxes

This chapter examines recognition and processing of text boxes as independent layout objects within a document. Text boxes often separate definitions, notes, warnings, examples or supplementary information from body text. They frequently have their own borders, backgrounds or positions and do not always follow the main text’s linear reading order.

This presents RAG systems with a particular challenge. A system must first identify a separate content container. It must then decide whether to integrate its content into normal document flow, store it as an independent chunk or apply a special semantic label. Ignoring text boxes loses potentially important information, while inserting them in the wrong body-text position can impair document coherence.

The test contains two text boxes with identical content, placed as independent objects in the document. It checks reliable identification, complete content extraction and continued separation of body text and box content. The results indicate how well additional editorial information layers can be used in RAG workflows.

7.12 Index

This chapter examines recognition and processing of indexes, especially in scientific monographs, manuals and legal commentaries. An index is a curated metadata tool, not merely a register of recurring words. Its entries target terms, concepts or names relevant to understanding and navigating the document, even when absent from the body text or appearing in a different form. Indexes therefore provide RAG systems with a particularly valuable additional information layer.

Index entries contain semantically condensed metadata. They represent terms deliberately marked by authors or editors as relevant for searching and referencing. These are often synonyms, broader terms or conceptual labels not directly inferable from textual analysis alone. Ignoring this information loses part of the document’s intellectual indexing work. This chapter tests whether index entries can be recognized, structurally captured and made usable for retrieval.

A major challenge is linking index entries to their text passages. Traditional indexes use page references: a term followed by one or more page numbers where it is thematically relevant. These normally refer to printed pagination rather than technical numbering such as PDF page numbers. Correct resolution combines recognition of the entry, interpretation of its page references and assignment to the corresponding text segments.

This is particularly demanding for RAG because entries are not anchored in body text but form a separate reference structure at the document’s end. They must be linked to layout information and page logic. Only knowing which text occurs on which printed page enables entries to bridge abstract terms and specific passages. This test directly builds on the page-logic and pagination-recognition mechanisms tested in the previous chapter.

Several index entries are placed throughout the document, referring to terms spread across different chapters. This tests correct cross-chapter reference resolution. An automatically generated index collects these entries at the end, clearly separated visually from body text and following the usual alphabetical order of scholarly indexes.

The test also checks whether the index is recognized as an independent document component and each entry captured as a structured record containing the term and its page references. Success strongly indicates that a system can integrate editorially produced metadata into RAG workflows and significantly improve search and answer quality.

back to top