A PDF page.
More...
A PDF page.
A representation of a page inside a PDF document. It is associated with an object and has a reference to the PDParser instance for the owning document.
Create a new page instance for the given parser and page number.
- Note
- Page numbers start at 1, not 0.
- Parameters
-
parser | Parser reference |
pageNumber | The page number of the page to fetch |
- Returns
- New PDPage object
Create a new page instance for the given parser and object.
- Note
- The object must belong to the parser, and may not be from a foreign instance of Pajdeg.
-
The object does not necessarily have to be a proper page at the time of creation, but it should (ideally) be one eventually.
- Parameters
-
parser | The parser owning object |
object | The /Page object |
- Returns
- A new page instance for the associated object
Fetch the annotations for this page, as an array of PDReferences and/or PDObjects. The entries are normally references, but if annotations were replaced or added as PDObjects, they will be returned as is.
- Parameters
-
- Returns
- An array of annotation references and objects.
Fetch (if unfetched) and return the index'th PDObject associated with the page's /Contents key. A lot of pages only have a single contents object, but they are allowed to have an array of them, in which case the resulting page is rendered as if the array of streams were concatenated.
- Parameters
-
page | Page whose contents object is requested |
index | The index (starting at 0) of the contents object to fetch |
- Returns
- The contents object for the given index, for the page
Determine the number of content objects this page has.
- Parameters
-
- Returns
- Number of content objects
Get the font object with the given font name for the page.
- Parameters
-
page | Page whose resource dictionary defines the font dictionary in which the font with the given name is defined |
fontName | The name of the font (a /Name string) |
- Returns
- PDFont object or NULL if no font with the given name was found
Fetch the media box for the given page.
- Parameters
-
- Note
- PDRects differ from e.g. CGRects in that they are composed of the two points making up the rectangle, as opposed to making up an origin pair and a size pair.
- Returns
- A PDRect representing the media box.
Copy this page and all associated objects into the PDF document associated with the pipe, inserting it at pageNumber.
With two separate simultaneous Pajdeg instances A and B with pages A1 A2 A3 and B1 B2 B3, the following operation
1 PDPageRef pageA2 = PDPageCreateForPageWithNumber(parserA, 2);
2 PDPageRef pageB2 = PDPageInsertIntoPipe(pageA2, pipeB, 2);
will result in the output of B consisting of pages B1 A2 B2 B3, in that order.
- Parameters
-
page | The page object that should be copied |
pipe | The pipe into which the page object should be inserted |
pageNumber | The resulting page number of the inserted page |
- Returns
- Reference to the inserted page, autoreleased