Tekninen artikkeli

PDF:n looginen objektimalli: Tyypit, viittaukset ja rakenne

PDF-tiedosto on sisimmältään (at heart) kokoelma objekteja, jotka osoittavat toisiinsa (point at one another). Jos poistat (Strip away the) pakkauksen (compression), ristiviittausten kirjanpidon (cross-reference bookkeeping, and the) ja tavusiirtymät (byte offsets, and what remains is a graph), jäljelle jää (what remains is a) kaavio (graph): pieni (small) joukko (set of) tyypitettyjä (typed) arvoja, jotka on kytketty (wired) yhteen (together by) viittauksilla (references, rooted at a single object the reader knows how to find) ja jotka juurtuvat (rooted at a) yhteen (single) objektiin, jonka lukija (reader knows how to) osaa löytää (find). Kaikki (Everything a PDF can express, from a paragraph of text to an embedded font to a digital signature, is built from), mitä PDF voi (can) ilmaista (express), tekstikappaleesta (from a paragraph of) upotettuun (embedded) fonttiin ja (to a) digitaaliseen allekirjoitukseen (digital signature), rakentuu (is built from) kahdeksasta (eight) primitiivisestä (primitive) objektityypistä (object types) ja säännöstä, joka antaa (lets one object refer to another) yhden objektin viitata toiseen (refer to another). Opi nämä (Learn those, and the rest of the format reads as composition rather than mystery), ja loppuformaatti on (and the rest of the format reads as) luettavissa ennemmin sommitteluna (composition) kuin (rather than) mysteerinä (mystery)

Tämä (This) on (is the) PDF:n (PDF, defined in ISO) looginen kerros (logical layer of), joka on (defined in ISO) määritelty (defined in) standardin ISO 32000-1 kohdassa (clause) 7.3, ja se sijaitsee (and it sits one level above the) yhden tason fyysisen tiedostoasettelun (header, body, cross-reference table, and trailer, which is its own subject in the) yläpuolella (above the physical file layout) (otsikko, runko, ristiviittaustaulukko ja (and) traileri, joka on (which is its own subject in the) oma (own) aiheensa artikkelissa PDF-tiedoston rakenteen (file structure) tekninen yleiskatsaus (technical overview of)). Looginen (logical model is what those) malli on sitä (is what those), mitä nuo tavut tarkoittavat, kun ne (once parsed) on (once) jäsennetty (parsed). Katseluohjelma (A viewer reads the) lukee tiedostoa taaksepäin (file backwards to find the trailer) löytääkseen trailerin, seuraa (follows it to the root) sitä (it to the) juureen (root), ja (and from there the document unfolds as objects referencing objects) sieltä alkaen (from there the) asiakirja avautuu (unfolds as) objekteina, jotka viittaavat (referencing) objekteihin (objects). Tätä (This is the part you reason about when you) osaa (part) mietit (reason about when you), kun (when you) selvität virheellistä sivua (debug a malformed page), kirjoitat jäsennintä (write a parser, or trust a library to assemble a document) tai (or) luotat (trust a library to assemble a) kirjaston kokoavan asiakirjan (assemble a document)

Kahdeksan (Eight) objektityyppiä (object types, and nothing else), eikä (and nothing) mitään (nothing) muuta (else)

PDF määrittelee (defines exactly eight basic object types) täsmälleen (exactly) kahdeksan (eight) perusobjektityyppiä (basic object types). Jokainen asiakirjan arvo (value in a document is one of them) on (is one of them) yksi (one of them) niistä (them), mikä (which is what keeps the format tractable despite its reach) pitää muodon (format) käsiteltävänä (tractable) sen (its) laajuudesta huolimatta (despite its reach)

Totuusarvot (Booleans) ovat avainsanat (keywords) true ja (and) false. Ne kytkevät (turn) lippuja (flags on and off) päälle ja (and) pois, kuten esimerkiksi sen (such as whether an annotation prints), tulostetaanko (prints) huomautus (annotation)

Numeroita (Numbers) on kahta laatua (flavors the), joita määritys (spec treats as one type) käsittelee yhtenä (treats as one type) tyyppinä: kokonaislukuja, kuten (integers like) 42, ja reaalilukuja, kuten (and reals like) 3.14 tai -0.002. PDF:ssä (PDF has no exponent notation) ei ole eksponenttimerkintää (exponent notation, so you will never see), joten et (so you will never see) koskaan näe arvoa 1e6 määritysten (conforming file) mukaisessa (conforming) tiedostossa (file). Koordinaatit, fonttikoot (font sizes, and) ja (and) kiertokulmat (rotation angles are all numbers) ovat kaikki (are all) numeroita (numbers)

Merkkijonot (Strings) sisältävät (hold sequences of) tavusekvenssejä, jotka on kirjoitettu joko (either) sulkeisiin (in parentheses), (Hello), tai kulmasulkeisiin heksadesimaaleina (in angle brackets as hexadecimal), <48656C6C6F>. Molemmat (Both) merkintätavat (notations) koodaavat saman (identical content) sisällön; heksadesimaali on pakotie tavuille, jotka ovat (bytes awkward inside parentheses) hankalia (awkward) sulkeiden (inside parentheses) sisällä (inside). Merkkijonot kuljettavat tekstiä, mutta ne ovat ensisijaisesti tavuja (they are bytes first), millä on (which matters the) merkitystä sillä (matters the) hetkellä (moment you handle anything beyond), kun (when you) käsittelet mitään (handle anything) ASCII:n ulkopuolella (beyond ASCII)

Nimet (Names) ovat (are atomic tokens introduced by a) jakamattomia merkkejä (atomic tokens introduced by a), jotka (introduced by a) esitellään (introduced by a) kauttaviivalla (slash): /Type, /Pages, /MediaBox. Nimi ei ole (A name is not a string) merkkijono (string); se on tunniste (identifier, used as a), jota käytetään (used as a dictionary key or an) sanakirjan (dictionary) avaimena tai (or an) lueteltuna (enumerated value, and two names are equal only if they match byte for byte) arvona, ja kaksi nimeä (two names are) ovat (are) yhtä suuret vain (only if they match), jos ne vastaavat (they match) toisiaan tavu (byte for byte) tavulta (byte for). Kauttaviiva on syntaksia, ei osa (not part of the) nimeä (name). Tämä kompastuttaa tulokkaita (trips up newcomers who treat), jotka käsittelevät arvoja (who treat) /Times-Roman ja merkkijonoa (and the string) (Times-Roman) keskenään vaihdettavina (as interchangeable; the format does not); muoto (format does not) ei (does not) niin tee

Taulukot (Arrays) ovat järjestettyjä (ordered, heterogeneous lists in), heterogeenisia (heterogeneous) luetteloita (lists in) hakasulkeissa (square brackets): [0 0 612 792] on sivun suorakulmio (page rectangle, and an array can mix types freely), ja taulukko voi (can mix types freely) sekoittaa tyyppejä vapaasti (mix types freely, including references to other objects), mukaan lukien (including) viittaukset (references to) muihin (other) objekteihin (objects). Sanakirjat (Dictionaries) ovat työjuhtia (workhorse). Sanakirja, joka on kirjoitettu merkkien (between) << ja >> väliin, yhdistää (maps name keys to values of any type) nimiavaimet (name keys) minkä (any) tahansa (any type) tyyppisiin (type) arvoihin (values of), ja lähes jokainen mielekäs (meaningful structure in) rakenne (structure in) PDF:ssä (PDF, page, catalog, font), — sivu (page), hakemisto (catalog), fontti, huomautus (annotation) — on (is a) sanakirja, jossa (with a) /Type-avain kertoo, mikä (declaring what it is) se on (what it is)

Virrat (Streams) ovat sanakirjoja (dictionaries with a tail of raw bytes between the), joiden perässä (with a tail of raw bytes between the) on raakatavuja (raw bytes between the) avainsanojen (keywords) stream ja (and) endstream välissä (between the). Sanakirja (dictionary describes the) kuvailee (describes the) tavuja (bytes) (niiden (their length, and any filters such as) pituuden ja mahdolliset suodattimet, kuten (such as) FlateDecode, jotka pakkaavat (compress them) ne), ja (and the) tavut kuljettavat tilaa vievää (bulky payload: page content instructions) hyötykuormaa: sivun (page) sisällön ohjeita (instructions, embedded font programs, images), upotettuja (embedded) fonttiohjelmia, kuvia (images). Virta on paikka, johon PDF laittaa kaiken (anything too large or too), mikä (anything) on (too large or too) liian (too) suurta tai liian binääristä ollakseen linjassa (inline)

Kahdeksas (The eighth type is the null object, the) tyyppi (type is the null object, the) on null-objekti (null object), avainsana null. Se on todellinen (real value, distinct from a key being) arvo (value), joka eroaa (distinct from a) avaimen puuttumisesta (key being absent). Sanakirjan (A dictionary entry set to null is treated as if it were not present) merkintää, joka on (entry set to) asetettu (set to) null-tilaan, käsitellään (treated as if it were not) ikään kuin sitä ei (if it were not) olisi olemassa (present), ja viittaus, joka (and a reference that resolves to a) ratkeaa (resolves to a) olemattomaan (non-existent) objektiin (object also yields), tuottaa myös arvon (also yields null rather than an error) null virheen (error) sijaan (rather than an). Tämä anteeksiantava (forgiving behavior is) käyttäytyminen (behavior is) on (is) tarkoituksellista (deliberate: it lets a damaged file degrade instead of refusing to): se antaa vaurioituneen (damaged file degrade instead of refusing to) tiedoston heikentyä sen (degrade instead of) sijaan (instead of), että se kieltäytyisi (refusing to) avautumasta (open). Yhdeksättä (There is no ninth type; everything) tyyppiä (type) ei (no) ole (There is no); kaikki, mitä PDF ilmaisee, syntyy (everything PDF expresses comes from how these eight) näiden (these eight) kahdeksan (eight) yhdistelmästä (combine)

Suorat (direct) arvot, epäsuorat (indirect) objektit ja (and) viittaukset (references)

Mikä (Any of those eight types can appear in) tahansa (Any) noista (those eight types can appear in) kahdeksasta (eight) tyypistä (types can appear in) voi (can) esiintyä (appear in) kahdella (two) tavalla (ways). Suora (direct) objekti on kirjoitettu paikoilleen (in place), kuten 612 MediaBox-taulukon sisällä (inside a). Epäsuoralle (indirect) objektille annetaan (is given an identity so) identiteetti (identity so), jotta muut objektit voivat (so other objects can) osoittaa (point at it) siihen: kaksi (two) kokonaislukua (integers), objektinumero ja generaationumero (generation number), käärien (wrapping the) määritelmän (definition in) tunnisteiden obj ja endobj sisään (in):

12 0 obj
<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>
endobj

Tämä (This is object 12, generation 0, a) on (is object 12, generation 0, a) objekti 12, generaatio 0, fonttisanakirja (font dictionary). Missä tahansa (Anywhere else in the) muualla tiedostossa (file, another object refers to it with) toinen (another) objekti (object refers to it with) viittaa (refers to it with) siihen (it with an) epäsuoralla viittauksella (indirect reference): samat kaksi (same two) numeroa, joita (followed by the) seuraa (followed by the) avainsana R, 12 0 R. Viittaus on (reference is a) osoitin (pointer). Kun sivun (When a page's resource dictionary says) resurssisanakirja sanoo /Font << /F1 12 0 R >>, se (it) nimeää (names object 12 as the) objektin (object) 12 fontiksi (font behind the) resurssinimen /F1 takana (behind the) kopioimatta (without copying the) fontin määritelmää (definition into the) sivulle (page)

Generaationumero on (generation number exists for deletions and) olemassa poistoja (deletions and) ja (and) uudelleenkäyttöä varten (reuse). Kun objekti vapautetaan (When an object is freed and its slot) ja (and its slot) sen paikka (slot) käytetään uudelleen (reused), generaatio kasvaa (generation increments so a), jotta vanhentunut (stale) 12 0 R ei (cannot resolve to the) voi (cannot) viitata (resolve to the) paikan (slot 12) 12 uuteen vuokralaiseen (new tenant of). Vasta kirjoitetut tiedostot (Freshly written files are almost all) ovat lähes kaikki (almost all) generaatiota (generation 0, but a) 0, mutta voimakkaasti muokattu tiedosto voi (heavily edited file can) sisältää (carry higher) suurempia numeroita, ja jäsennin, joka jättää (parser that ignores the generation will eventually read the wrong object) generaation (generation will eventually read the wrong) huomiotta (ignores the), lukee (read the) lopulta väärän objektin

Epäsuoruus (Indirection is what) tekee (makes PDF efficient and) PDF:stä tehokkaan ja (efficient and) muokattavan (editable). Yksi (One) fontti, kuva (image) tai väriavaruus (color space can be defined once and) voidaan määritellä kerran ja (once and) siihen voidaan viitata (referenced from a) sadalta (hundred) sivulta (pages). Pieni (small) muutos voidaan liittää (can be appended as a) uutena versiona (new revision that), joka korvaa yksittäisen objektin (supersedes a single object rather than) koko tiedoston uudelleenkirjoittamisen (rewriting the) sijaan (rather than). Ristiviittaustaulukko (cross-reference table is the index that turns an) on hakemisto, joka (index that) muuttaa (turns an) objektinumeron (object number into a) tavusiirtymäksi (byte offset), joten lukija hyppää (reader jumps straight to) suoraan objektiin 12 0 obj ilman (without) skannausta (scanning), mutta se on fyysinen (physical) optimointi (optimization). Loogisesti ainoa (all) asia, joka (all you need to know is that) sinun tarvitsee (need to) tietää (know is that), on (is that), että 12 0 R tarkoittaa "objektia (object identified as), jonka tunniste (identified as) on (identified as) 12 0"

Hakemisto (catalog): mistä jokainen asiakirja alkaa (where every document begins)

Viittausten (Resolving references has to start) ratkaisemisen on alettava jostain (somewhere), ja tuo (and that) jokin paikka (somewhere is the) on trailerin /Root-merkintä, joka osoittaa (which points at the) asiakirjahakemistoon (document catalog): objektikaavion (object graph, a) juureen (root of the), sanakirjaan (dictionary with), jossa (with) on /Type /Catalog. Lukija saavuttaa (reader reaches it) sen ensimmäisenä, koska traileri löytyy (trailer is found first, and from) ensimmäisenä, ja (and from) sieltä (there every) käsin kaikki (every) asiakirjan (document is reachable by) muut osat (other part of the) ovat (is) saavutettavissa (reachable by) seuraamalla (following) viittauksia (references)

Hakemisto sisältää (catalog carries only two) vain kaksi (two) ehdottomasti (strictly) vaadittua merkintää: sen /Type-arvon (Type, and) ja /Pages-arvon, joka on epäsuora (indirect) viittaus sivupuun juureen (root of the). Loput (The rest are) ovat valinnaisia (optional and describe document-wide) ja (and describe document-wide) kuvaavat asiakirjan (document-wide) laajuista käyttäytymistä sisällön sijaan (content): /Outlines osoittaa kirjanmerkkipuuhun (bookmark tree), /Names sisältää (holds name) merkkijonolla (string) avainnettuja (keyed by) nimipuita (name trees), /Metadata viittaa (references an) XMP-metadatavirtaan (metadata stream), ja /PageMode sekä /PageLayout ehdottavat (suggest how a viewer should open the), kuinka (how a) katseluohjelman (viewer should) tulisi (should) avata (open the) asiakirja (document). Mitään (None of) niistä ei tarvita sivun renderöintiin (render a page; they configure the); ne konfiguroivat sivujen (pages) ympärillä (around the) olevaa (experience around the) kokemusta (experience). Hakemistosta roikkuvat (hanging off the) kirjanmerkki-, metadata- ja (and) huomautusrakenteet (annotation structures) on käsitelty artikkelissa (article on) PDF:n metadata, kirjanmerkit (bookmarks, and) ja (and) huomautukset (annotations)

Alla (The diagram below) oleva (below) kaavio (diagram) näyttää (shows where the), missä objektin (object body sits in the) runko sijaitsee (sits in the) ympäröivässä tiedostossa (surrounding file). Hakemisto ja (catalog and) sivupuu elävät tuon rungon sisällä (live inside that body as) tavallisina epäsuorina (ordinary indirect) objekteina (objects; the); otsikko (header), ristiviittaustaulukko (cross-reference table, and) ja (and) traileri (trailer around them) niiden (them) ympärillä (around them) ovat (are the) fyysinen tukirakenne (physical scaffolding that lets a), jonka (that) avulla lukija voi (reader locate them) paikantaa ne (locate them)

Diagram of a PDF file's four physical sections: a version header, a body holding the document objects including the catalog and page tree, a cross-reference table of object offsets, and a trailer pointing at the root

Sivupuu (page tree): sivujen tasapainoinen (balanced) hierarkia

/Pages-kohdasta asiakirja (document branches into the) haarautuu (branches into the) sivupuuhun (page tree, where), missä (where) PDF:n valinta käyttää (choice of a graph over a flat) kaaviota litteän luettelon sijaan (over a flat list pays) palkitsee (pays off). Sivuja (Pages are) ei (not) tallenneta (stored as a) yksinkertaisena sarjana (simple sequence; they hang from a); ne roikkuvat puussa, jonka (whose interior nodes are) sisäiset (interior) solmut (nodes) ovat sivupuusolmuja (page tree nodes) (/Type /Pages) ja jonka (and whose) lehdet (leaves are) ovat sivuobjekteja (page objects) (/Type /Page). Sisäinen (interior node) solmu (node lists its) luettelee (lists its) lapsensa /Kids-taulukossa ja tallentaa (records, in) /Count-avainta käyttäen tiedon siitä, kuinka (how many) monta (many) lehtisivua (leaf pages) sen (it) alapuolella (beneath it) on (live beneath it). Jokaiseen (Every) solmuun (node except the) juurta lukuun ottamatta (except the root carries a) sisältyy /Parent-viittaus ylöspäin (back up, so the tree walks in), joten (so the tree walks in) puuta (tree) voi käydä läpi kumpaan tahansa suuntaan (either direction)

2 0 obj                                  % sivupuun juuri (root of the page tree)
<< /Type /Pages /Kids [3 0 R 4 0 R] /Count 3 >>
endobj

3 0 obj                                  % lehtisivu (leaf page)
<< /Type /Page /Parent 2 0 R
   /MediaBox [0 0 612 792]
   /Resources << /Font << /F1 12 0 R >> >>
   /Contents 5 0 R >>
endobj

4 0 obj                                  % sisäinen solmu (interior node), joka (grouping two more) ryhmittelee (grouping two more) kaksi muuta sivua (two more pages)
<< /Type /Pages /Parent 2 0 R /Kids [6 0 R 7 0 R] /Count 2 >>
endobj

Tässä (Here) objekti (object) 2 on juuri (root, with), ja sen alla (beneath it: the) on (with) kolme (three) sivua (pages): lehtisivu (leaf page) 3 sekä (plus two more) kaksi (two) muuta, jotka ovat saavutettavissa (reachable through) sisäisen solmun (interior node) 4 kautta (through). Juuren (root's) /Count-arvon 3 on oltava (has to equal the) yhtä suuri kuin (equal the) sen (it) alla (below it, and a) olevien lehtien (leaves) kokonaismäärä, ja määrä (and a count that disagrees with the), joka (that) on ristiriidassa (disagrees with the) todellisen (actual) rakenteen (structure) kanssa (with the), on yleinen (common) syy (way a) siihen, että käsin muokattu tiedosto (hand-edited file goes) menee (goes) pieleen (wrong). Puun tarkoitus (point of the tree is) on pääsyn (access) paikallisuus (locality of). Lukija (A reader opening page) avatessaan tuhatsivuisen (thousand-page) asiakirjan sivun 900 ei käy läpi 900 objektia; se laskeutuu kourallisen (handful of) solmuja, koska oikein muotoiltu puu (well-formed tree stays) pysyy (stays) matalana ja tasapainoisena (balanced). Tällaisen (Building such a tree by) puun rakentaminen käsin on (hand is fiddly enough to be) tarpeeksi (enough to be) pikkutarkkaa, jotta sen (it) näkeminen alusta loppuun on vaivan arvoista (worth seeing end to end, which the), minkä vuoksi läpikäynti (walkthrough on) artikkelissa PDF-asiakirjan rakentaminen alusta (from scratch) pitäen (from scratch) tekeekin (does) juuri niin

Puu ansaitsee paikkansa myös (tree earns its second keep through) perinnän (inheritance) ansiosta (through). Kourallinen sivuattribuutteja (handful of page attributes, /Resources, /MediaBox, /CropBox, and /Rotate, may be): /Resources, /MediaBox, /CropBox ja /Rotate, voidaan asettaa sisäiseen solmuun (interior node and) ja jättää pois yksittäisiltä sivuilta (individual pages, which), jotka (which) sitten (then) perivät (inherit the) lähimmän (nearest) esi-isän (ancestor's) arvon (value). Aseta (Set) /MediaBox kerran juureen (once on the root and), ja jokainen (every) lehti saa (leaf gets the) saman (same) sivukoon (page size without) ilman toistoa (without repeating it; a); sivu, jonka (page that needs to) täytyy (needs to) erota (differ declares its), ilmoittaa oman kokonsa (declares its own). Tämä on se yksi paikka objektimallissa (object model where a), jossa (where a) arvon (value's) merkitys (meaning depends on an) riippuu objektin sijainnista puussa (object's position in the tree, not only on), ei (not only on) pelkästään (only on) sen omasta sisällöstä (its own contents)

Mitä (What a) lehtisivu (leaf page) todella sisältää (actually holds)

Sivuobjekti (A page object is the) on liitoskohta (join point between the) rakennemallin ja näkyvän sisällön (visible content) välillä (between the). Sen /Contents-merkintä viittaa yhteen tai useampaan (references one or more) sisältövirtaan, eli (the) piirto-operaattoreihin, jotka (drawing operators that paint text and graphics onto the) maalaavat tekstiä ja grafiikkaa sivulle (page). Sen (Its) /Resources-sanakirja nimeää (dictionary names the) fontit, kuvat (images, and) ja (and) väriavaruudet (color spaces those operators rely on, each), joihin (those) nuo operaattorit (operators) tukeutuvat (rely on, each), jokaisen (each) merkinnän ollessa (entry an indirect reference to an) epäsuora (indirect) viittaus yli (across) sivujen (pages) jaettuun objektiin (object shared across). /MediaBox antaa sivun (gives the page rectangle in) suorakulmion pisteinä (points) (1/72 tuumaa), ja (and) merkinnät kuten (entries like) /Rotate ja /CropBox säätävät (adjust how it is) sitä, kuinka se (it is) esitetään (presented)

Työnjako (That division of labor is the) on (is the) koko (whole) malli pienoiskoossa (model in miniature). Sivusanakirja (page dictionary is) on rakenne: tyypitettyjä merkintöjä ja (typed entries and) viittauksia, jotka (references that say what the page is and what it draws with) kertovat, mikä (what the) sivu on ja (and) millä se (what it) piirtää (draws with). Sisältövirta (content stream is) on (is) ohjeita (instructions: a separate, compressible): erillinen, pakattava (compressible) möykky, joka kertoo (blob that says how to) kuinka (how to) piirtää. Fontti /F1:n takana on jaettu resurssi (shared resource, defined once and pointed at wherever it is), joka on (defined once and pointed at wherever it is) määritelty (defined once and pointed at wherever it is) kerran ja johon osoitetaan kaikkialta, missä sitä käytetään (used). Sanakirja, virta ja viittaus (reference cooperate to) tekevät yhteistyötä (cooperate to) renderöidäkseen yhden sivun, ja (and the) samat (same) kuviot (patterns scale to the) skaalautuvat (scale to the) koko (whole) asiakirjaan (document). Tämän möykyn sisällä olevat (operators inside that blob are) sisältövirtakomento-operaattorit (content stream operators inside that blob are) on käsitelty erikseen artikkeleissa tekstistä ja (and) fonteista (fonts) sekä grafiikasta ja visuaalisista elementeistä (visual elements)

Miksi (Why this model is) tämä malli on (is) tuntemisen arvoinen (worth knowing)

Useimmat (Most) kehittäjät kohtaavat objektimallin vasta (object model only when), kun (when) jokin (something) menee rikki (breaks): sivu renderöityy tyhjänä (page renders blank because its), koska (because its) sen /Contents-viittaus (reference dangles, text comes out as) roikkuu irrallaan (dangles, text comes out as), teksti näkyy laatikkoina, koska (boxes because a font resource was never embedded, a) fonttiresurssia (font resource) ei (never) koskaan upotettu (embedded, a), työkalu (tool reports a) ilmoittaa (reports a) /Count-arvoksi sellaisen, joka ei vastaa sen löytämiä sivuja. Jokainen (Each of those is a statement about the) näistä (those) on (is a statement about the) väittämä (statement about the) kaaviosta (graph, and), ja (and) kaavion (graph directly beats) lukeminen (reading the graph directly beats) suoraan voittaa arvaamisen (guessing). Kahdeksan (eight) tyyppiä ja viittaussääntö muodostavat (reference rule are a) riittävän pienen (small enough) sanaston, jotta sen (vocabulary to) voi (hold in your) pitää päässään (head, and), ja (and) kun (once you see a) näet PDF:n objekteina (objects pointing at), jotka osoittavat objekteihin (objects, malformed files stop), vialliset tiedostot (malformed files stop being) lakkaavat olemasta läpinäkymättömiä (opaque)

Tästä huolimatta (That said, writing the) mallin (model by) kirjoittaminen (writing the) käsin on (hand is rarely the right call beyond) harvoin oikea valinta oppimisen ulkopuolella (beyond learning). Ristiviittausten siirtymien (cross-reference offsets, generation), generaationumeroiden (generation numbers, page-tree), sivupuun laskurien (counts, and) ja (and) virran (stream) pituuksien pitäminen johdonmukaisina (consistent across) muokkauksien (edits is the) yli on juuri sellaista kirjanpitoa, jota (bookkeeping a) kirjasto (library exists to) on olemassa (exists to) hoitaakseen (handle). Tuotannossa (In production, a) kypsä PDF-kehityskirjasto (mature PDF development library) hallitsee objektikaaviota ja (object graph while) antaa (leaving you to) sinun (you to) ajatella sivuina ja (think in pages and) sisältönä. Mallin tunteminen palkitsee (pays off) silti: ymmärrät (you understand what the), mitä kirjasto (library builds underneath, and) rakentaa konepellin (underneath, and) alla (underneath, and) ja (and) miksi (why)