Lines Matching refs:PDF
1 PDF Theory of Operation
9 * Add section "Using the PDF backend"
14 Internally, SkPDFDocument and SkPDFDevice represents PDF documents and
19 See [Using Skia's PDF Backend](../../user/sample/pdf) to find out how
26 * [Typical usage of the PDF backend](#Typical_usage_of_the_PDF_backend)
27 * [PDF Objects and Document Structure](#PDF_Objects_and_Document_Structure)
28 * [PDF drawing](#PDF_drawing)
41 <span id="Typical_usage_of_the_PDF_backend">Typical usage of the PDF backend</span>
44 SkPDFDevice is the main interface to the PDF backend. This child of
51 serializing the PDF file.
54 <span id="PDF_Objects_and_Document_Structure">PDF Objects and Document Structure</span>
57 ![PDF Logical Document Structure](/dev/design/PdfLogicalDocumentStructure.png)
59 **Background**: The PDF file format has a header, a set of objects and
70 Furthermore, PDF files can support a *linearized* mode, where objects
74 objects used or referenced on the first page of the PDF have object
76 generating a linearized PDF, all objects, their sizes, and object
80 %PDF-1.4
96 PDF object must inherit from SkPDFObject and implement the methods to
98 used as resources. SkPDFTypes.h defines most of the basic PDF object
107 All of these PDF object types except the stream type can be used in
113 the PDF specification that requires an inline reference in some place
145 %PDF-1.4
182 <span id="PDF_drawing">PDF drawing</span>
185 Most drawing in PDF is specified by the text of a stream, referred to
189 PDF interpreter to draw things, like a rectangle (`x y w h re`), an
197 between Skia and PDF’s support for transparency (which will be
229 There are a number of high level PDF objects (like fonts, graphic
231 single PDF. To ensure that there is only one copy of each object,
238 PDF has a number of parameters that affect how things are drawn. The
245 graphic state object. PDF does not allow specifying color in the
264 Similar to Skia, PDF allows drawing to be clipped or
266 of the PDF backend. PDF does not support perspective transforms
268 however, have more issues to cotend with. PDF clips cannot be directly
270 is no way to draw to it. However, PDF provides a limited depth stack
271 for the PDF graphic state (which includes the drawing parameters
273 transform). Therefore to undo a clip, the PDF graphic state must be
280 a valid PDF content stream, the transforms and clips are compared to
285 stack provided in the PDF format.
307 coordinate space from an origin in the lower left (PDF default) to the
314 which tracks the state of the PDF graphics stack and optimizes the
325 with. Images, layers (see below), and fonts assume the standard PDF
329 ([issue 241](https://bug.skia.org/241)). PDF doesn't draw zero length
334 PDF has a higher level object called a form x-object (form external
335 object) that is basically a PDF page, with resources and a content
358 * We can't assume that an arbitrary font will be available at PDF view
359 time, so we embed all fonts in accordance with modern PDF
365 PDF backend always uses the glyph-id encoding of the text.
382 PDF only supports an 8-bit encoding for Type1 or Type3 fonts. However,
383 they can contain more than 256 glyphs. The PDF backend handles this by
413 gradient is always normalized to one. Then, a type 4 PDF function is
425 PDF supports some of the xfer modes used in Skia directly. For those,
429 Difference, Exclusion). Aside from the standard SrcOver mode, PDF does
475 shape of Src is the same as the opaque part of the drawing, since PDF