interplane.Get Omega
Read in your language

omega-pdf

Omega PDF: read and write PDF files in Omega

Brought by drakestapleton

branch main Branches Tags History

omega-pdf / corpus / expect / prose.txt

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