The fz_page structure contains a list of functions used to implement the page level calls:
The fz_page (and hence derived foo_page) structures are reference counted. The refs field is used to keep the reference count in. All the reference counting is handled by the core library, and all that is required of the implementation is that it should supply a drop_page function that will be called when the reference count reaches zero. This is of type:
Implementations must fill in the bound_page field with the address of a function to return the pages bounding box, of type:
Implementations must fill in the run_page_contents field with the address of a function to interpret the contents of a page, of type:
If a document format supports internal or external hyperlinks, then its implementation must fill in the load_links field with the address of a function to load the links from a page, of type:
If a document format supports annotations, then its implementation must fill in the first_annot field with the address of a function to load the annotations from a page, of type:
Some document formats can encode information that specifies how pages should be presented to the user as a slideshow - how long they should be displayed, and which transition to use when moving to the next page etc. In implementations of document handlers for such formats, they should fill in the page_presentation field with the address of a function to obtain this information, of type:
Some document formats can encapsulate multiple color separations. In order to allow proofing of such formats, MuPDF allows such separations to be enumerated and enabled/disabled. In document handlers for such document formats, the control_separation, separation_disabled, count_separations and get_separation fields should be filled in with functions of the following types respectively: