Learning Wrapping up

Review quiz

All 38 questions from the ends of the Learning pages, in reading order. Pick an answer and check it: every answer comes with the reason, and a wrong one links back to the page that covers it.

Foundations

The big picture

Q1. A PostScript file is a program you run to get pages. What is a PDF file instead?
A compiled version of the same programA database of numbered objects with an indexA sequence of page imagesAn XML document with embedded fonts
Check
Q2. How different is PDF 1.7 (ISO 32000-1) from PDF 1.4 at its core?
A new syntax and object modelThe same syntax, but a new imaging modelThe same syntax, object model and imaging model, plus later additionsIdentical: ISO only renamed it
Check
Q3. A PDF 1.3 reader opens a file that uses transparency. What happens?
It refuses to open the fileIt shows a warning and skips the transparent objectsIt renders the transparent content correctlyIt renders the transparent content as opaque, without a warning
Check

Objects

Q4. Which of these is not a valid PDF number?
.5-31e53.14
Check
Q5. A stream has /Filter [/ASCII85Decode /FlateDecode]. In what order does a reader decode it?
ASCII85 first, then FlateFlate first, then ASCII85Either order gives the same bytesOnly the last filter applies
Check
Q6. Why may a stream's /Length be an indirect reference such as 7 0 R?
So several streams can share one lengthBecause lengths over 65535 must be indirectSo that encryption can change itBecause a writer streaming its output doesn't know the length until it has written the data
Check

File anatomy

Q7. What does each in-use entry of a classic cross-reference table store?
The object's byte offset in the fileThe object's length in bytesA hash of the objectThe page number the object belongs to
Check
Q8. Where does a reader start when it opens a PDF?
At the %PDF- headerAt the end of the file, looking for startxrefAt the document catalogAt the first page object
Check
Q9. How does an incremental update change a file?
It rewrites the changed objects in placeIt replaces the trailer and nothing elseIt appends the changed objects, a new xref section and a trailer whose /Prev points to the old xrefIt rewrites the whole file with the changes merged in
Check

The document tree

Q10. How is the document tree laid out in the file?
As nested dictionaries, indented like the treeCatalog first, then the page tree in order, then the pagesAs numbered objects in any order, linked by N 0 R referencesIn a separate section after the cross-reference table
Check
Q11. Which of these page attributes is not inherited from a /Pages node?
/MediaBox/Rotate/Resources/Contents
Check
Q12. A 1.3 file is edited with an incremental update that uses 1.4 features. Where does the new version number go?
Rewrite the %PDF- headerThe /Version entry in the catalogThe trailer's /Info dictionaryA new startxref comment
Check

Drawing a page

Content streams

Q13. In default user space, where is the origin and what is one unit?
Top-left, 1 pixelBottom-left, 1/72 inchTop-left, 1/72 inchCenter, 1 mm
Check
Q14. What does 0 0 1 RG set?
The fill color, to blueThe stroke color, to blueBoth stroke and fill, to blueThe stroke color, to red
Check
Q15. An image is painted with /Im0 Do. What decides its size on the page?
Its /Width and /Height, read as pointsThe page's /MediaBoxThe current transformation matrix: images always paint into the unit squareThe image's own /BBox
Check

Graphics state

Q16. Which of these is not saved and restored by q and Q?
The clipping pathThe text matrixThe fill colorThe font set with Tf
Check
Q17. A form XObject's content stream never sets a fill color. What color do its fills come out in?
Black, the initial valueWhatever fill color was current at its DoThe color named in its /ResourcesNone: unset fills aren't painted
Check
Q18. Which of these can only be set through an ExtGState dictionary and gs?
Line widthFill colorFont and sizeOverprint
Check

Text and fonts

Q19. Copy-paste from a PDF gives garbage characters. What is most likely missing?
A /ToUnicode CMap on the fontAn XMP metadata streamThe /MediaBoxA /StructTreeRoot
Check
Q20. Which font type do modern generators use for arbitrary Unicode text?
Type1TrueTypeType3Type0
Check
Q21. An OCR'd scan has searchable text over the page image. Which text rendering mode draws that text?
0, fill1, stroke3, invisible7, add to clipping path
Check

Transparency

Q22. Which ExtGState key sets the opacity of fills?
/CA/ca/BM/SMask
Check
Q23. What does an isolated transparency group (/I true) composite its contents against?
A transparent backdropWhatever is already on the page beneath itThe group's first elementWhite
Check
Q24. Why do PDF/A-1 and PDF/X-1a forbid transparency?
They are based on PDF 1.3, before transparencyThey chose the opaque subset of PDF 1.4 for predictable outputTransparency invalidates digital signaturesPrinters can't reproduce transparency
Check

Beyond the page

Encryption and signatures

Q25. In an encrypted PDF, what is encrypted?
Everything after the headerStrings and streams; dictionaries, names and numbers stay in the clearOnly the page content streamsOnly the document information dictionary
Check
Q26. An encrypted file's /P forbids printing. What stops someone who can open it from printing it?
Only the reader choosing to honor /PThe encryption itselfThe owner password, which is needed to decrypt the contentA digital signature over /P
Check
Q27. What does a signature's /ByteRange cover?
The page content streamsThe objects changed since the last saveThe signature field's widget annotationThe whole file except the hole holding the signature value in /Contents
Check

Interactive features

Q28. Why should an annotation have an appearance stream (/AP)?
So that it can be clickedSo that it renders the same in every readerSo that text extraction includes itBecause links don't work without one
Check
Q29. Which of these is not an action type?
GoToURIWidgetJavaScript
Check

Tagged PDF and metadata

Q30. What in the catalog declares that a file follows Tagged PDF conventions?
/StructTreeRoot/MarkInfo << /Marked true >>/Lang/Metadata
Check
Q31. In a structure element, what does /K 0 mean?
Knockout is offThe element has no childrenThe content marked /MCID 0 on the element's page (/Pg)The element's first child in the parent tree
Check
Q32. How does a viewer find which structure element owns the text under the cursor?
It searches the structure tree from the rootFrom the page's /StructParents, through the /ParentTree, to the entry for that MCIDThrough the font's /ToUnicode CMapFrom the marked-content tag before BDC
Check
Q33. Every page has a running page number. How should a tagged PDF mark it?
As a /P structure elementWith /ActualTextAs an /Artifact in the content streamLeave it unmarked
Check
Q34. Which kind of metadata was added in PDF 1.4 and is required by PDF/A?
The document information dictionary (/Info)An XMP metadata stream (/Metadata)The /MarkInfo dictionaryThe trailer's /ID
Check

Wrapping up

What changed from 1.4 to 1.7

Q35. Which version introduced object streams and cross-reference streams?
1.41.51.61.7
Check
Q36. Which of these may be stored inside an object stream?
A page content streamThe encryption dictionaryA page dictionaryThe cross-reference stream
Check
Q37. In a cross-reference stream, what does a type 2 entry say about an object?
It is freeIt is at a byte offset in the fileIt is inside an object stream: which one, and its index thereIt is encrypted with a crypt filter
Check
Q38. How many content-stream operators did PDF 1.5, 1.6 and 1.7 add between them?
None31273
Check
Reset38 questions

Section references such as 1.4 §3.4 1.7 §7.5 are to the Adobe PDF Reference, third edition (PDF 1.4) and ISO 32000-1:2008 (PDF 1.7). Where to get them: PDF specifications.