Pajdeg
0.2.2
Pajdeg
|
PDF catalog, whose primary purpose is to map PDF objects to pages in a PDF document. More...
Files | |
file | PDCatalog.h |
Typedefs | |
typedef struct PDCatalog * | PDCatalogRef |
Functions | |
PDCatalogRef | PDCatalogCreateWithParserForObject (PDParserRef parser, PDObjectRef catalog) |
PDInteger | PDCatalogGetObjectIDForPage (PDCatalogRef catalog, PDInteger pageNumber) |
PDInteger | PDCatalogGetPageCount (PDCatalogRef catalog) |
void | PDCatalogInsertPage (PDCatalogRef catalog, PDInteger pageNumber, PDObjectRef pageObject) |
PDF catalog, whose primary purpose is to map PDF objects to pages in a PDF document.
The PDF catalog, usually derived from the "root" object of the PDF, consists of a media box (a rectangle defining the size of all pages) as well as an array of "kids", each kid being a page in the PDF.
The PDParser instantiates the catalog to the root object's Pages object on demand, e.g. when a task filter is set to some page, or simply when the developer requests it for the first time.
typedef struct PDCatalog* PDCatalogRef |
A catalog object.
PDCatalogRef PDCatalogCreateWithParserForObject | ( | PDParserRef | parser, |
PDObjectRef | catalog | ||
) |
Set up a catalog with a PDParser and a catalog object.
The catalog will, via the parser, fetch the information needed to provide a complete representation of the pages supplied by the given catalog object. Normally, the catalog object is the root object of the PDF.
parser | The PDParserRef instance. |
catalog | The catalog object. |
PDInteger PDCatalogGetObjectIDForPage | ( | PDCatalogRef | catalog, |
PDInteger | pageNumber | ||
) |
Determine the object ID for the given page number, or throw an assertion if the page number is out of bounds.
catalog | The catalog object. |
pageNumber | The page number whose object ID should be provided. |
PDInteger PDCatalogGetPageCount | ( | PDCatalogRef | catalog | ) |
Determine the number of pages in this catalog.
catalog | The catalog object. |
void PDCatalogInsertPage | ( | PDCatalogRef | catalog, |
PDInteger | pageNumber, | ||
PDObjectRef | pageObject | ||
) |
Insert a page into the catalog.
This does not affect the final representation of the output PDF in any way, but is here to ensure that the representation of a catalog is up to date with page modifications.
catalog | The catalog |
pageNumber | The page number (index starts at 1, not 0) |
pageObject | The page object being inserted |