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) | 74 ![PDF Logical Document Structure](/dev/design/PdfLogicalDocumentStructure.png) |
75 | 75 |
76 **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 |
77 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 |
78 in the document (the cross-reference table). The table of contents | 78 in the document (the cross-reference table). The table of contents |
79 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 |
80 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 |
81 dependent on the object number assigned to the referenced object; | 81 dependent on the object number assigned to the referenced object; |
82 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 |
83 objects is known, which requires assignment of object | 83 objects is known, which requires assignment of object |
84 numbers. | 84 numbers. |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 * [issue 244](https://bug.skia.org/244) | 591 * [issue 244](https://bug.skia.org/244) |
592 Mostly, only TTF fonts are directly supported. (User metrics | 592 Mostly, only TTF fonts are directly supported. (User metrics |
593 show that almost all fonts are truetype. | 593 show that almost all fonts are truetype. |
594 * [issue 260](https://bug.skia.org/260) | 594 * [issue 260](https://bug.skia.org/260) |
595 Page rotation is accomplished by specifying a different | 595 Page rotation is accomplished by specifying a different |
596 size page instead of including the appropriate rotation | 596 size page instead of including the appropriate rotation |
597 annotation. | 597 annotation. |
598 | 598 |
599 * * * | 599 * * * |
600 | 600 |
OLD | NEW |