OLD | NEW |
1 PDF Theory of Operation | 1 PDF Theory of Operation |
2 ======================= | 2 ======================= |
3 | 3 |
4 <!-- | 4 <!-- |
5 PRE-GIT DOCUMENT VERSION HISTORY | 5 PRE-GIT DOCUMENT VERSION HISTORY |
6 2012-06-25 Steve VanDeBogart | 6 2012-06-25 Steve VanDeBogart |
7 * Original version | 7 * Original version |
8 2015-01-14 Hal Canary. | 8 2015-01-14 Hal Canary. |
9 * Add section "Using the PDF backend" | 9 * Add section "Using the PDF backend" |
10 * Markdown formatting | 10 * Markdown formatting |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 draw_content(&canvas); | 64 draw_content(&canvas); |
65 | 65 |
66 SkPDFDocument doc; | 66 SkPDFDocument doc; |
67 doc.appendPage(dev); | 67 doc.appendPage(dev); |
68 doc.emitPDF(&pdf_stream); | 68 doc.emitPDF(&pdf_stream); |
69 | 69 |
70 <a name="PDF_Objects_and_Document_Structure"></a> | 70 <a name="PDF_Objects_and_Document_Structure"></a> |
71 PDF Objects and Document Structure | 71 PDF Objects and Document Structure |
72 ---------------------------------- | 72 ---------------------------------- |
73 | 73 |
| 74 ![PDF Logical Document Structure](PdfLogicalDocumentStructure.png) |
| 75 |
74 **Background**: The PDF file format has a header, a set of objects and | 76 **Background**: The PDF file format has a header, a set of objects and |
75 then a footer that contains a table of contents for all of the objects | 77 then a footer that contains a table of contents for all of the objects |
76 in the document (the cross-reference table). The table of contents | 78 in the document (the cross-reference table). The table of contents |
77 lists the specific byte position for each object. The objects may have | 79 lists the specific byte position for each object. The objects may have |
78 references to other objects and the ASCII size of those references is | 80 references to other objects and the ASCII size of those references is |
79 dependent on the object number assigned to the referenced object; | 81 dependent on the object number assigned to the referenced object; |
80 therefore we can’t calculate the table of contents until the size of | 82 therefore we can’t calculate the table of contents until the size of |
81 objects is known, which requires assignment of object | 83 objects is known, which requires assignment of object |
82 numbers. | 84 numbers. |
83 | 85 |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 * [issue 244](https://bug.skia.org/244) | 591 * [issue 244](https://bug.skia.org/244) |
590 Mostly, only TTF fonts are directly supported. (User metrics | 592 Mostly, only TTF fonts are directly supported. (User metrics |
591 show that almost all fonts are truetype. | 593 show that almost all fonts are truetype. |
592 * [issue 260](https://bug.skia.org/260) | 594 * [issue 260](https://bug.skia.org/260) |
593 Page rotation is accomplished by specifying a different | 595 Page rotation is accomplished by specifying a different |
594 size page instead of including the appropriate rotation | 596 size page instead of including the appropriate rotation |
595 annotation. | 597 annotation. |
596 | 598 |
597 * * * | 599 * * * |
598 | 600 |
OLD | NEW |