omega-pdf
Omega PDF: read and write PDF files in Omega
Brought by drakestapleton
omega-pdf / corpus / src / prose.txt
| 1 | A reader for the portable document format |
| 2 | |
| 3 | This file was written for the omega-pdf test corpus. It is plain prose, typed by hand, so that every word in the exported document is known in advance and its text can be compared with what a reader prints. |
| 4 | |
| 5 | The first job of a reader is to find the end of the file. The last lines name the byte offset of the cross-reference section, and from there every object can be found by its number. A file that was saved more than once has several sections, each pointing to the one before it. |
| 6 | |
| 7 | Some characters are outside plain ASCII: café, naïve, façade, Ångström, Øresund, smörgåsbord, jalapeño, Zürich, déjà vu. Punctuation too: “double quotes”, ‘single quotes’, an em dash — like this, an en dash in 1990–1999, an ellipsis…, a bullet • and a euro sign €. Fine fish find fluffy flowers in the field. |
| 8 | |
| 9 | Numbers are written as text: 3.14159, 2,718, 100%, 42 + 58 = 100. |
| 10 | |
| 11 | A page tree holds the pages. Each page names its resources, its media box and the streams that draw it. The streams are programs: operators that move a text position and show strings in a font. The font says which character each byte means. |
| 12 | |
| 13 | When a stream is compressed, the reader inflates it first. Cross-reference streams also use a predictor, which stores each row as the difference from the row above; undoing that step is part of reading them. |
| 14 | |
| 15 | The rest of this file repeats a paragraph so that the document runs to more than one page. |
| 16 | |
| 17 | Paragraph one. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 18 | |
| 19 | Paragraph two. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 20 | |
| 21 | Paragraph three. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 22 | |
| 23 | Paragraph four. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 24 | |
| 25 | Paragraph five. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 26 | |
| 27 | Paragraph six. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 28 | |
| 29 | Paragraph seven. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 30 | |
| 31 | Paragraph eight. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 32 | |
| 33 | Paragraph nine. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 34 | |
| 35 | Paragraph ten. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 36 | |
| 37 | Paragraph eleven. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 38 | |
| 39 | Paragraph twelve. A reader that prints text in the order the file draws it does not know about columns, tables or reading order on the page. It prints what the content stream shows, line by line, with a space where the gap between two runs is wide. |
| 40 | |
| 41 | The last line of the document. |