Crate mupdf_sys

source ·

Structs

Structure definitions are public to enable stack based allocation. Do not access the members directly.
Allocator structure; holds callbacks and private data pointer.
Structure definition is public to enable stack based allocation. Do not access the members directly.
Implementation details: Subject to change.
Bitmaps have 1 bit per component. Only used for creating halftoned versions of contone buffers, and saving out. Samples are stored msb first, akin to pbms.
fz_buffer is a wrapper around a dynamically allocated array of bytes.
Buffers of compressed data; typically for the source data for images.
Compression parameters used for buffers of compressed data; typically for the source data for images.
Provide two-way communication between application and library. Intended for multi-threaded applications where one thread is rendering pages and another thread wants to read progress feedback or abort a job that takes a long time to finish. The communication is unsynchronized without locking.
Structure to hold default colorspaces.
Devices can keep track of containers (clips/masks/groups/tiles) as they go to save callers having to do it.
Structure definition is public so other classes can derive from it. Callers should not access the members directly, though implementations will need initialize functions directly.
Structure is public to allow other structures to be derived from it. Do not access members directly.
struct fz_draw_options: Options for creating a pixmap and draw device.
Every fz_font carries a set of flags within it, in a fz_font_flags_t structure.
Structure is public to allow other structures to be derived from it. Do not access members directly.
fz_irect is a rectangle using integers instead of floats.
Any storable object that can appear in the key of another storable object should include an fz_key_storable structure at the start (by convention at least) of their structure.
Simple text layout (for use with annotation editing primarily).
fz_link is a list of interactive links on a page.
Locations within the document are referred to in terms of chapter and page, rather than just a page number. For some documents (such as epub documents with large numbers of pages broken into many chapters) this can make navigation much faster as only the required chapter needs to be decoded at a time.
Locking functions
fz_matrix is a row-major 3x3 matrix used for representing transformations of coordinates throughout MuPDF.
Structure definition is public to enable stack based allocation. Do not access the members directly.
fz_outline is a tree of the outline of a document (also known as table of contents).
Structure definition is public so other classes can derive from it. Do not access the members directly.
PCL output
PCLm output
PDFOCR output
Pixmaps represent a set of pixels for a 2 dimensional region of a plane. Each pixel has n components per pixel. The components are in the order process-components, spot-colors, alpha, where there can be 0 of any of those types. The data is in premultiplied alpha when rendering, but non-premultiplied for colorspace conversions and rescaling.
fz_point is a point in a two-dimensional space.
A representation for a region defined by 4 points.
Structure definition is public to enable stack based allocation. Do not access the members directly.
Structure definition is public to enable stack based allocation. Do not access the members directly.
Structure is public to allow derived classes. Do not access the members directly.
In order to shape a given font, we need to declare it to a shaper library (harfbuzz, by default, but others are possible). To avoid redeclaring it every time we need to shape, we hold a shaper handle and the destructor for it within the font itself. The handle is initialised by the caller when first required and the destructor is called when the fz_font is destroyed.
A text block is a list of lines of text (typically a paragraph), or an image.
A text char is a unicode character, the style in which is appears, and the point at which it is positioned.
A text line is a list of characters that share a common baseline.
Options for creating a pixmap and draw device.
A text page is a list of blocks, together with an overall bounding box.
Any storable object should include an fz_storable structure at the start (by convention at least) of their structure. (Unless it starts with an fz_key_storable, see below).
The store can be seen as a dictionary that maps keys to fz_storable values. In order to allow keys of different types to be stored, we have a structure full of functions for each key ‘type’; this fz_store_type pointer is stored with each key, and tells the store how to perform certain operations (like taking/ dropping a reference, comparing two keys, outputting details for debugging etc).
Every type of object to be placed into the store defines an fz_store_type. This contains the pointers to functions to make hashes, manipulate keys, and check for needing reaping.
Text buffer.
Handy routine for processing mesh based shades

Constants

Statics

Functions

Get the number of bits of antialiasing we are using (for graphics). Between 0 and 8.
Add a new char to the line at the end of the layout block.
Add a new line to the end of the layout block.
Add a separation (null terminated name, colorspace)
Add a separation with equivalents (null terminated name, colorspace)
Given a rectangle (assumed to be the bounding box for a path), expand it to allow for the expansion of the bbox that would be seen by stroking the path with the given stroke state and transform.
Return the advance for a given glyph.
AES block processing. Encrypts or Decrypts (according to mode, which must match what was initially set up) length bytes (which must be a multiple of 16), using (and modifying) the insertion vector iv, reading from input, and writing to output.
AES decryption intialisation. Fills in the supplied context and prepares for decryption using the given key.
AES encryption intialisation. Fills in the supplied context and prepares for encryption using the given key.
Write a base64 encoded data block, optionally with periodic newlines.
Append a base64 encoded fz_buffer, optionally with periodic newlines.
Append the contents of the source buffer onto the end of the destination buffer, extending automatically as required.
fz_append_*: Append data to a buffer.
fz_append_pdf_string: Append a string with PDF syntax quotes and escapes.
fz_append_printf: Format and append data to buffer using printf-like formatting (see fz_vsnprintf).
fz_append_vprintf: Format and append data to buffer using printf-like formatting with varargs (see fz_vsnprintf).
RC4 block encrypt operation; encrypt src into dst (both of length len) updating the RC4 state as we go.
RC4 finalization. Zero the context.
RC4 initialization. Begins an RC4 operation, writing a new context.
Return a pointer to a string describing the format of the archive.
Allocated sprintf.
Range checking atof
atoi that copes with NULL
64bit atoi that copes with NULL
Test if the given password can decrypt the document.
Find the filename component in a path.
Called to start the process of writing a page to a document.
Partitions the given Unicode sequence into one or more unidirectional fragments and invokes the given callback function for each fragment.
Retrieve details of a given bitmap.
Map from enumeration to blend mode string.
Return the bounding box of the page recorded in a display list.
Return a bbox for a given glyph in a font.
Determine the size of a page at 72 dpi.
Return a bounding rectangle for a path.
Bound a given shading.
Find the bounds of a given text object.
Take ownership of buffer contents.
Retrieve internal memory of buffer.
Allocate array of memory of count entries of size bytes. Clears the memory to zero.
fz_calloc equivalent that returns NULL rather than throwing exceptions.
UTF8 decode a single rune from a sequence of chars.
Clamp the samples in a color to the correct ranges for a given colorspace.
Clamps a location into valid chapter/page range. (First clamps the chapter into range, then the page into range).
rewrite path to the shortest string that names the same path.
Set the entire bitmap to 0.
Empties the buffer. Storage is not freed, but is held ready to be reused as the buffer is refilled.
Sets all components (including alpha) of all pixels in a pixmap to 0.
Clears a subrect of a pixmap with the given value.
Clears a pixmap with the given value.
Make a clone of an existing context.
Returns a reference to a newly cloned default colorspaces structure.
Clone the data for a path.
Clone a pixmap, copying the pixels and associated data to new storage.
Return a separations object with all the spots in the input separations object that are set to composite, reset to be enabled. If there ARE no spots in the object, this returns NULL. If the object already has all its spots enabled, then just returns another handle on the same object.
Create an identical stroke_state structure and return a reference to it.
Finishes up the output and closes the band writer. After this call no more headers or bands may be written.
Signal the end of input, and flush any buffered output. This is NOT called implicitly on fz_drop_device. This may throw exceptions.
Called to end the process of writing pages to a document.
Flush pending output and close an output stream.
Close the zip file for writing.
Close the current subpath.
Retrieve a the name for a colorant.
True if DeviceN color space has cyan magenta yellow or black as one of its colorants.
True if DeviceN color space has only colorants from the CMYK set.
Tests for particular types of colorspaces
True for CMYK, Separation and DeviceN colorspaces.
Query the number of colorants in a colorspace.
Query the name of a colorspace.
Assign a name for a given colorant in a colorspace.
Query the type of colorspace.
Compress bitmap data as CCITT Group 3 1D fax image. Creates a stream assuming the default PDF parameters, except the number of columns.
Compress bitmap data as CCITT Group 4 2D fax image. Creates a stream assuming the default PDF parameters, except K=-1 and the number of columns.
Return the storage size used for a buffer and its data. Used in implementing store handling.
Retrieve the underlying compressed data for an image.
Multiply two matrices.
Add a chained stream to the end of the concatenate filter.
Test rectangle inclusion.
Convert color values sv from colorspace ss into colorvalues dv for colorspace ds, via an optional intervening space is, respecting the given color_params.
Convert pixmap from indexed to base colorspace.
Convert an existing pixmap to a desired colorspace. Other properties of the pixmap, such as resolution and position are copied to the converted pixmap.
Convert a color given in terms of one colorspace, to a color in terms of another colorspace/separations.
Convert pixmap from DeviceN/Separation to base colorspace.
Copy an option (val) into a destination buffer (dest), of maxlen bytes.
Return a newly allocated UTF-8 string with the text for a given selection rectangle.
Return a newly allocated UTF-8 string with the text for a given selection.
Return the number of active separations.
Number of entries in archive.
Return the number of pages in a chapter. May return 0.
Return the number of chapters in the document. At least 1.
Return the number of pages in document
Create a new link on a page.
Return the current point that a path has reached or (0,0) if empty.
Append a ‘curveto’ command to an open path. (For a cubic bezier).
Append a ‘curvetov’ command to an open path. (For a cubic bezier with the first control coordinate equal to the start point).
Append a ‘curvetoy’ command to an open path. (For a cubic bezier with the second control coordinate equal to the end point).
Output debugging information for the current state of the store to the given output channel.
Pretty-print an XML tree to stdout.
Decode a subarea of a compressed image. l2factor is the amount of subsampling inbuilt to the stream (i.e. performed by the decoder). If non NULL, l2extra is the extra amount of subsampling that should be performed by this routine. This will be updated on exit to the amount of subsampling that is still required to be done.
FIXME: Better not to expose fz_default_error_callback, and fz_default_warning callback and to allow ‘NULL’ to be used int fz_set_xxxx_callback to mean “defaults”.
Retrieve default colorspaces (typically page local).
Create a ‘default’ halftone structure for the given number of components.
The default warning callback. Declared publicly just so that the warning callback can be set back to this after it has been overridden.
Decrement the defer reap count.
Increment the defer reap count.
Compress source_length bytes of data starting at source, into a buffer of length *destLen, starting at dest. compressed_length will be updated on exit to contain the size actually used.
Returns the upper bound on the size of flated data of length size.
Delete an existing link on a page.
Detach a node from the tree, unlinking it from its parent, and setting the document root to the node.
Find current scissor region as tracked by the device.
Retrieve global default colorspaces.
extract the directory component from a path.
Disable (clear) hint bits within the hint bitfield for a device.
Disable icc profile based operation.
Check for a display list being empty
Find the output intent colorspace if the document has defined one.
Query if the document supports the saving of accelerator data.
Add an attribute to an element.
Insert an element as the last child of a parent, unlinking the child from its current position if required.
Retrieve the value of a given attribute from a given element.
Return a borrowed reference for the ‘body’ element of the given DOM.
Clone an element (and its children).
Create an element of a given tag type for the given DOM.
Create a text node for the given DOM.
Return a borrowed reference for the document (the top level element) of the DOM.
Find the first element matching the requirements in a depth first traversal from elt.
Find the next element matching the requirements.
Return a borrowed reference to the first child of a node, or NULL if there isn’t one.
Enumerate through the attributes of an element.
Insert an element (new_elt), after another element (node), unlinking the new_elt from its current position if required.
Insert an element (new_elt), before another element (node), unlinking the new_elt from its current position if required.
Return a borrowed reference to the next sibling of a node, or NULL if there isn’t one.
Return a borrowed reference to the parent of a node, or NULL if there isn’t one.
Return a borrowed reference to the previous sibling of a node, or NULL if there isn’t one.
Remove an element from the DOM. The element can be added back elsewhere if required.
Remove an attribute from an element.
Drop a reference to an archive.
Drop the reference to the band writer, causing it to be destroyed.
Drop a reference to the bitmap. When the reference count reaches zero, the bitmap will be destroyed.
Drop a reference to the buffer. When the reference count reaches zero, the buffer is destroyed.
Drops a reference to the colorspace.
Drop a reference to a compressed buffer. Destroys the buffer and frees any storage/other references held by it.
Free a context and its global state.
Drop a reference to the default colorspaces structure. When the reference count reaches 0, the references it holds internally to the underlying colorspaces will be dropped, and the structure will be destroyed.
Reduce the reference count on a device. When the reference count reaches zero, the device and its resources will be freed. Don’t forget to call fz_close_device before dropping the device, or you may get incomplete output!
Decrement the reference count for a display list. When the reference count reaches zero, all the references in the display list itself are dropped, and the display list is freed.
Decrement the document reference count. When the reference count reaches 0, the document and all it’s references are freed.
Called to discard a fz_document_writer. This may be called at any time during the process to release all the resources owned by the writer.
Drop a reference to a fz_font, destroying the font when the last reference is dropped.
Drop a reference and free a glyph.
Drop a reference to the halftone. When the reference count reaches zero, the halftone is destroyed.
Destroy the hash table.
Decrement the (normal) reference count for an image. When the total (normal + key) reference count reaches zero, the image and its resources are freed.
Internal destructor for the base image class members.
Internal destructor exposed for fz_store integration.
Decrement the store key reference count for an image. When the total (normal + key) reference count reaches zero, the image and its resources are freed.
Decrement the reference count for a jbig2 globals record. When the reference count hits zero, the record is freed.
Special jbig2 globals drop function for use in implementing store support.
Decrement the (normal) reference count for a storable object. When the total reference count hits zero, the drop function for that object is called to free the object.
Decrement the (key) reference count for a storable object. When the total reference count hits zero, the drop function for that object is called to free the object.
Drop layout block. Free the pool, and linked blocks.
Decrement the reference count for a link. When the reference count reaches zero, the link is destroyed.
Decrements the reference count. When the reference point reaches zero, the outline is freed.
Drop the current iterator.
Free an output stream. Don’t forget to close it first!
Decrements the reference count for the page. When the reference count hits 0, the page and its references are freed.
Decrement the reference count. When the reference count hits zero, free the path.
Decrement the reference count for the pixmap. When the reference count hits 0, the pixmap is freed.
Drop a pool, freeing and invalidating all storage returned from the pool.
Decrement the reference count for a separations structure. When the reference count hits zero, the separations structure is freed.
Decrement the reference count for the shade structure. When the reference count hits zero, the structure is freed.
Internal function to destroy a shade. Only exposed for use with the fz_store.
Decrement the reference count for a storable object. When the reference count hits zero, the drop function for that object is called to free the object.
Decrement the reference count for the store context. When the reference count hits zero, the store context is freed.
Decrements the reference count for a stream.
Drop a reference to a stroke state structure, destroying the structure if it is the last reference.
Decrement the reference count for the text object. When the reference count hits zero, the text object is freed.
Drop the tree.
Drop a reference to the XML. When the last reference is dropped, the node and all its children and siblings will be freed.
Drop the reference to the zipfile.
Dump debug statistics for the glyph cache.
Evict every item from the store.
Enable (set) hint bits within the hint bitfield for a device.
Enable icc profile based operation.
Find the glyph id for a given unicode character within a font.
Encode character, preferring small-caps variant if available.
Find the glyph id for a given unicode character within a font, falling back to an alternative if not found.
Called to end the process of writing a page to a document.
Retrieve the currently set error callback, or NULL if none has been set. Optionally, if user is non-NULL, the user pointer given when the warning callback was set is also passed back to the caller.
Expand a bbox by a given amount in all directions.
Return true if the named file exists and is readable.
Device calls; graphics primitives and containers.
Fill pixmap with solid color.
Filter every element in the store with a matching type with the given function.
Find an item within the store.
Flush unwritten data.
Flush any repeated warnings.
Retrieve font ascender in ems.
Retrieve the font bbox.
Retrieve font descender in ems.
Retrieve the MD5 digest for the font’s data.
Retrieve a pointer to the font flags for a given font. These can then be updated as required.
Retrieve the FT_Face handle for the font.
Query whether the font flags say that this font is bold.
Query whether the font flags say that this font is italic.
Query whether the font flags say that this font is monospaced.
Query whether the font flags say that this font is serif.
Retrieve a pointer to the name of the font.
Retrieve a pointer to the shaper data structure for the given font.
Retrieve the Type3 procs for a font.
Format an internal link to a page number, location, and possible viewing parameters, suitable for use with fz_create_link.
create output file name using a template.
Our customised ‘printf’-like string formatter. Takes %c, %d, %s, %u, %x, as usual. Modifiers are not supported except for zero-padding ints (e.g. %02d, %03u, %04x, etc). %g output in “as short as possible hopefully lossless non-exponent” form, see fz_ftoa for specifics. %f and %e output as usual. %C outputs a utf8 encoded int. %M outputs a fz_matrix*. %R outputs a fz_rect*. %P outputs a fz_point*. %n outputs a PDF name (with appropriate escaping). %q and %( output escaped strings in C/PDF syntax. %l{d,u,x} indicates that the values are int64_t. %z{d,u,x} indicates that the value is a size_t.
Free a previously allocated block of memory.
Apply gamma correction to a pixmap. All components of all pixels are modified (except alpha, which is unchanged).
Generate a frame of a transition.
Find the name of a glyph
Called to get a handle to a pixmap from an image.
Calls fz_get_pixmap_from_image() with ctm, subarea, w and h all set to NULL.
Simple functions/variables for use in tools.
Return the bounding box of the glyph in pixels.
Determine if a given glyph in a font is cacheable. Certain glyphs in a type 3 font cannot safely be cached, as their appearance depends on the enclosing graphic state.
Return the height of the glyph in pixels.
Return the width of the glyph in pixels.
Get the number of bits of antialiasing we are using for graphics. Between 0 and 8.
Get the minimum line width to be used for stroked lines.
Grid fit a matrix.
Make some space within a buffer (i.e. ensure that capacity > size).
Check if entry by given name exists.
Look for a given option (key) in the opts string. Return 1 if it has it, and update *val to point to the value within opts.
Check permission flags on document.
Iterate over the entries in a hash table, removing all the ones where callback returns true. Does NOT free the value of the entry, so the caller is expected to take care of this.
Search for a matching hash within the table, and return the associated value.
Iterate over the entries in a hash table.
Insert a new key/value pair into the hash table.
Remove the entry for a given key.
Lock against Harfbuzz being called simultaneously in several threads. This reuses FZ_LOCK_FREETYPE.
Unlock after a Harfbuzz call. This reuses FZ_LOCK_FREETYPE.
Return a list of quads to highlight lines inside the selection points.
Request the natural orientation of an image.
Request the natural resolution of an image.
Return the size of the storage used by an image.
Expand a bbox to include a given point. To create a rectangle that encompasses a sequence of points, the rectangle must first be set to be the empty rectangle at one of the points before including the others.
Install functions to allow MuPDF to request fonts from the system.
Compute intersection of two bounding boxes.
Compute intersection of two rectangles.
Create an inverse matrix.
Invert all the pixels in a pixmap. All components (process and spots) of all pixels are inverted (except alpha, which is unchanged).
Invert the alpha fo all the pixels in a pixmap.
Transform the pixels in a pixmap so that luminance of each pixel is inverted, and the chrominance remains unchanged (as much as accuracy allows).
Invert all the pixels in a given rectangle of a pixmap. All components of all pixels in the rectangle are inverted (except alpha, which is unchanged).
Convert a rect into the minimal bounding box that covers the rectangle.
Determine if a given path is a directory.
Is the document reflowable.
Query whether a link is external to a document (determined by uri containing a ‘:’, intended to match with ‘://’ which separates the scheme from the scheme specific parts in URIs).
Check and parse string into page ranges: /,?(-?\d+|N)(-(-?\d+|N))?/
Check if the pixmap is a 1-channel image containing samples with only values 0 and 255
Inclusion test for irects. (Rect is assumed to be open, i.e. top right corner is not included).
Inclusion test for quads.
Inclusion test for rects. (Rect is assumed to be open, i.e. top right corner is not included).
Inclusion test for quad in quad.
Intersection test for quads.
Check if a transformation is rectilinear.
Detect if stream object is a tar achieve.
Check to see that a colorspace is appropriate to be used as a blending space (i.e. only grey, rgb or cmyk).
Detect if stream object is a zip archive.
Return buffer containing jbig2 globals data stream.
Keep a reference to an archive.
Take an additional reference to the bitmap. The same pointer is returned.
Take an additional reference to the buffer. The same pointer is returned.
Increment the reference count for the colorspace.
Keep an additional reference to the default colorspaces structure.
Increment the reference count for a device. Returns the same pointer.
Increment the reference count for a display list. Returns the same pointer.
Increment the document reference count. The same pointer is returned.
Add a reference to an existing fz_font.
Take a reference to a glyph.
Take an additional reference to the halftone. The same pointer is returned.
Increment the (normal) reference count for an image. Returns the same pointer.
Increment the store key reference for an image. Returns the same pointer. (This is the count of references for an image held by keys in the image store).
Increment the reference count for a jbig2 globals record.
Increment the (normal) reference count for a key storable object. Returns the same pointer.
Increment the (key) reference count for a key storable object. Returns the same pointer.
Increment the reference count for a link. The same pointer is returned.
Increment the reference count. Returns the same pointer.
Increment the reference count for the page. Returns the same pointer.
Increment the reference count for the page. Returns the same pointer. Must only be used when the alloc lock is already taken.
Increment the reference count. Returns the same pointer.
Increment the reference count for the pixmap. The same pointer is returned.
Increment the reference count for a separations structure. Returns the same pointer.
Increment the reference count for the shade structure. The same pointer is returned.
Increment the reference count for a storable object. Returns the same pointer.
Increment the reference count for the store context. Returns the same pointer.
Increments the reference count for a stream. Returns the same pointer.
Take an additional reference to a stroke state structure.
Increment the reference count for the text object. The same pointer is returned.
Add a reference to the XML.
Function to get the location for the last page in the document. Using this can be far more efficient in some cases than calling fz_count_pages and using the page number.
Layout reflowable document types.
Append a ‘lineto’ command to an open path.
Get listed name of entry position idx.
Load a page.
Try to load a fallback font for the given combination of font attributes. Whether a font is present or not will depend on the configuration in which MuPDF is built.
Create a jbig2 globals record from a buffer.
Exposed for PDF.
Load the list of links for a page.
Load the hierarchical document outline.
Routine to implement the old Structure based API from an iterator.
Load a given page number from a document. This may be much less efficient than loading by location (chapter+page) for some document types.
Attempt to load a given font from the system.
Attempt to load a given font from the system.
Exposed for CBZ.
Converts from page number to chapter+page. This may cause many chapters to be laid out in order to calculate the number of pages within those chapters.
Output a line to the log.
Output a line to the log for a given module.
Search the builtin base14 fonts for a match. Whether a given font is present or not will depend on the configuration in which MuPDF is built.
Map from (case sensitive) blend mode string to enumeration.
Find a bookmark and return its page number.
Search the builtin fonts for a match. Whether a given font is present or not will depend on the configuration in which MuPDF is built.
Search the builtin cjk fonts for a match. Whether a font is present or not will depend on the configuration in which MuPDF is built.
Search the builtin cjk fonts for a match for a given language. Whether a font is present or not will depend on the configuration in which MuPDF is built.
Return the matching FZ_ADOBE_* ordering for the given language tag, such as “zh-Hant”, “zh-Hans”, “ja”, or “ko”.
Retrieve document meta data strings.
Search the builtin noto fonts for a match. Whether a font is present or not will depend on the configuration in which MuPDF is built.
Search the builtin noto fonts specific symbol fonts. Whether a font is present or not will depend on the configuration in which MuPDF is built.
Map from (case sensitive) rendering intent string to enumeration value.
Create a bookmark for the given page, which can be used to find the same location after the document has been laid out with different parameters.
Allocate uninitialized memory of a given size. Does NOT clear the memory!
fz_malloc equivalent that returns NULL rather than throwing exceptions.
Calculate average scaling factor of matrix.
Find the largest expansion performed by this matrix. (i.e. max(abs(m.a),abs(m.b),abs(m.c),abs(m.d))
Create an MD5 digest from buffer contents.
MD5 finalization. Ends an MD5 message-digest operation, writing the message digest and zeroizing the context.
MD5 initialization. Begins an MD5 operation, writing a new context.
MD5 block update operation. Continues an MD5 message-digest operation, processing another message block, and updating the context.
MD5 block update operation. Continues an MD5 message-digest operation, processing an int64, and updating the context.
Measure the advance width of a UTF8 string should it be added to a text object.
Find the start of the first occurrence of the substring needle in haystack.
Fill block with len bytes of pseudo-randomness.
Add an archive to the set of archives handled by a multi archive.
Append a ‘moveto’ command to a path. This ‘opens’ a path.
Check if a document is encrypted with a non-blank password.
Compression and other filtering outputs.
Create a new font from one of the built-in fonts.
Create a device to compute the bounding box of all marks on a page.
Create a new bitmap.
Make a bitmap from a pixmap and a halftone.
Make a bitmap from a pixmap and a halftone, allowing for the position of the pixmap within an overall banded rendering.
Create a new buffer with data decoded from a base64 input string.
Create a new buffer containing a copy of the passed data.
Create a new buffer with existing data.
Reencode a given image as a PNG into a buffer.
Returns an fz_buffer containing a page after conversion to specified format.
Reencode a given pixmap as a PNG into a buffer.
Like fz_new_buffer, but does not take ownership.
Convert structured text into plain text.
Create a calibrated gray colorspace.
Create a calibrated rgb colorspace.
Create a new band writer, outputing color pcl.
Creates a new colorspace instance and returns a reference.
Create a new default colorspace structure with values inherited from the context, and return a reference to it.
Compress source_length bytes of data starting at source, into a new memory block malloced for that purpose. compressed_length is updated on exit to contain the size used. Ownership of the block is returned from this function, and the caller is therefore responsible for freeing it. The block may be considerably larger than is actually required. The caller is free to fz_realloc it down if it wants to.
Compress the contents of a fz_buffer into a new block malloced for that purpose. *compressed_length is updated on exit to contain the size used. Ownership of the block is returned from this function, and the caller is therefore responsible for freeing it. The block may be considerably larger than is actually required. The caller is free to fz_realloc it down if it wants to.
Devices are created by calls to device implementations, for instance: foo_new_device(). These will be implemented by calling fz_new_derived_device(ctx, foo_device) where foo_device is a structure “derived from” fz_device, for instance typedef struct { fz_device base; …extras…} foo_device;
Create an empty display list.
Create a display list.
Create a display list from page contents (no annotations).
Parse an SVG document into a display-list.
Parse an SVG document into a display-list.
New documents are typically created by calls like foo_new_document(fz_context *ctx, …). These work by deriving a new document type from fz_document, for instance: typedef struct { fz_document base; …extras… } foo_document; These are allocated by calling fz_new_derived_document(ctx, foo_document)
Create a new fz_document_writer, for a file of the given type.
Internal function to allocate a block for a derived document_writer structure, with the base structure’s function pointers populated correctly, and the extra space zero initialised.
Like fz_new_document_writer but takes a fz_output for writing the result. Only works for multi-page formats.
Create a device to draw on a pixmap.
Create a device to draw on a pixmap.
Create a device to draw on a pixmap.
Create a new pixmap and draw device, using the specified options.
Create a device to draw on a pixmap.
Create a new font from a font file in a fz_buffer.
Create a new font from a font file.
Create a new font from a font file in memory.
Create a new hash table.
Create a colorspace from an ICC profile supplied in buf.
Create a new image from a buffer of data, inferring its type from the format of the data.
Create an image based on the data in the supplied compressed buffer.
Create a new image from a display list.
Create a new image from the contents of a file, inferring its type from the format of the data.
Create an image from the given pixmap.
Create a scalable image from an SVG document.
Create a scalable image from an SVG document.
Internal function to make a new fz_image structure for a derived class.
Create an indexed colorspace.
Create a new layout block, with new allocation pool, zero matrices, and initialise linked pointers.
Create a new link record.
Create a rendering device for a display list.
Internal function to actually do the opening of the logfile.
Create a new band writer, outputing monochrome pcl.
Create a new monochrome pwg band writer.
Create a new multi archive (initially empty).
Create a device to OCR the text on the page.
Create a new outline entry with zeroed fields for the caller to fill in.
Get an iterator for the document outline.
Create a new output object with the given internal state and function pointers.
Open an output stream that appends to a buffer.
Open an output stream that writes to a given path.
Different document types will be implemented by deriving from fz_page. This macro allocates such derived structures, and initialises the base sections.
Create a band writer targetting pnm (greyscale, rgb or cmyk, with or without alpha).
Create a new (empty) path structure.
Create a new band writer, targetting pbm.
Create a new band writer, outputing pclm
Document writers for various possible output formats.
Create a new band writer, outputing pdfocr.
Create a new pixmap, with its origin at (0,0)
Render the page to a pixmap using the transform and colorspace.
Render the page contents with control over spot colors.
Render the page contents without annotations.
Create a new pixmap that represents a subarea of the specified pixmap. A reference is taken to this pixmap that will be dropped on destruction.
Create a pixmap of a given size, location and pixel format.
Create a pixmap of a given size, location and pixel format, using the supplied data block.
Create a new pixmap, with its origin at (0,0) using the supplied data block.
Create a new pkm band writer for CMYK pixmaps.
Create a new png band writer (greyscale or RGB, with or without alpha).
Create a band writer targetting pnm (greyscale or rgb, no alpha).
Create a new pool to allocate from.
Create a postscript band writer for gray, rgb, or cmyk, no alpha.
Open a PSD band writer.
Create a new color pwg band writer.
Create a new separations structure (initially empty)
Create a device to extract the text on a page.
Create an empty text page.
Extract text from page.
Create a new store inside the context
Create a new stream object with the given internal state and function pointers.
Create a new (empty) stroke state structure (with no dash data) and return a reference to it.
Create a new (empty) stroke state structure, with room for dash data of the given length, and return a reference to it.
Create a device that outputs (single page) SVG files to the given output stream.
Create a device that outputs (single page) SVG files to the given output stream.
Create a device to test for features.
Create a new empty fz_text object.
Create a device to print a debug trace of all device calls.
Create an archive that holds named buffers.
Create a new (empty) type3 font.
Use text extraction to convert the input document into XHTML, then open the result as a new document that can be reflowed.
Create a device to output raw information.
Create a new zip writer that writes to a given file.
Create a new zip writer that writes to a given output stream.
Function to get the location of the next page (allowing for the end of chapters etc). If at the end of the document, returns the current location.
Normalize a vector to length one.
a85d filter performs ASCII 85 Decoding of data read from the chained filter.
Open a document file and read its basic structure so pages and objects can be located. MuPDF will try to repair broken documents (without actually changing the file contents).
Open a document using the specified stream object rather than opening a file on disk.
aesd filter performs AES decoding of data read from the chained filter using the supplied key.
ahxd filter performs ASCII Hex decoding of data read from the chained filter.
arc4 filter performs RC4 decoding of data read from the chained filter using the supplied key.
Open a zip or tar archive
Opens an archive entry as a stream.
Open zip or tar archive stream.
Open a buffer as a stream.
Open a stream to read the decompressed version of a buffer.
Concat filter concatenates several streams into one.
dctd filter performs DCT (JPEG) decoding of data read from the chained filter.
Open a directory as if it was an archive.
Open a document file and read its basic structure so pages and objects can be located. MuPDF will try to repair broken documents (without actually changing the file contents).
Open a document using the specified stream object rather than opening a file on disk.
The endstream filter reads a PDF substream, and starts to look for an ‘endstream’ token after the specified length.
faxd filter performs FAX decoding of data read from the chained filter.
Open the named file and wrap it in a stream.
Create a stream from a FILE * that will not be closed when the stream is dropped.
flated filter performs LZ77 decoding (inflating) of data read from the chained filter.
Open a stream to read the decompressed version of another stream with optional log2 subsampling.
Open a stream to read the decompressed version of a buffer, with optional log2 subsampling.
Open a filter that performs jbig2 decompression on the chained stream, using the optional globals record.
Attach a filter to a stream that will store any characters read from the stream into the supplied buffer.
lzwd filter performs LZW decoding of data read from the chained filter.
Open a block of memory as a stream.
The null filter reads a specified amount of data from the substream.
predict filter performs pixel prediction on data read from the chained filter.
The range filter copies data from specified ranges of the chained stream.
rld filter performs Run Length Decoding of data read from the chained filter.
SGI Log 16bit (greyscale) decode from the chained filter. Decodes lines of w pixels to 8bpp greyscale.
SGI Log 24bit (LUV) decode from the chained filter. Decodes lines of w pixels to 8bpc rgb.
SGI Log 32bit (LUV) decode from the chained filter. Decodes lines of w pixels to 8bpc rgb.
Open a tar archive file.
Open a tar archive stream.
4bit greyscale Thunderscan decoding from the chained filter. Decodes lines of w pixels to 8bpp greyscale.
Open a zip archive file.
Open a zip archive stream.
Check to see if an option, a, from a string matches a reference option, b.
Look a glyph up from a font, and return the outline of the glyph using the given transform.
Delete the current item.
Call to insert a new item BEFORE the current point.
Call to get the current outline item.
Calls to move the iterator position.
Update the current item properties according to the given item.
Output accelerator data for the document to a given output stream.
Query whether a given fz_output supports fz_stream_from_output.
Pack a path into the given block. To minimise the size of paths, this function allows them to be packed into a buffer with other information. Paths can be used interchangeably regardless of how they are packed.
Return the number of bytes required to pack a path.
Converts from chapter+page to page number. This may cause many chapters to be laid out in order to calculate the number of pages within those chapters.
Get the presentation details for a given page.
Get the separations details for a page. This will be NULL, unless the format specifically supports separations (such as PDF files). May be NULL even so, if there are no separations on a page.
Query if a given page requires overprint.
Render a shade to a given pixmap.
Parse draw device options from a comma separated key-value string.
Parse PCL options.
Parse PCLm options.
Parse PDFOCR options.
Parse stext device options from a comma separated key-value string.
Parse the contents of buffer into a tree of xml nodes.
Parse the contents of a buffer into a tree of XML nodes, using the HTML5 parsing algorithm.
Initialize PCL option struct for a given preset.
Set the progress callback for a pdfocr bandwriter.
Return the number of alpha planes in a pixmap.
Return the bounding box for a pixmap.
Return the number of colorants in a pixmap.
Return the colorspace of a pixmap
Return the number of components in a pixmap.
Return the height of the pixmap in pixels.
Retrieve the underlying fz_pixmap for an image.
Returns a pointer to the pixel data of a pixmap.
Return the number of spots in a pixmap.
Return the number of bytes in a row in the pixmap.
Return the width of the pixmap in pixels.
Return the x value of the pixmap in pixels.
Return the y value of the pixmap in pixels.
Allocate a block of size bytes from the pool.
The current size of the pool.
strdup equivalent allocating from the pool.
Scale a matrix by postmultiplication.
Rotate a transformation by premultiplying.
Scale a matrix by premultiplication.
Premultiply a matrix with a shearing matrix.
Translate a matrix by premultiplication.
Force a type3 font to cache the displaylist for a given glyph id.
Function to get the location of the previous page (allowing for the end of chapters etc). If already at the start of the document, returns the current page.
Output structured text to a file in HTML (visual) format.
Output structured text to a file in JSON format.
Output structured text to a file in plain-text UTF-8 format.
Output structured text to a file in XHTML (semantic) format.
Output structured text to a file in XML format.
Iterates over all opened pages of the document, calling the provided callback for each page for processing. If the callback returns non-NULL then the iteration stops and that value is returned to the called of fz_process_opened_pages().
Process a shade, using supplied callback functions. This decomposes the shading to a mesh (even ones that are not natively meshes, such as linear or radial shadings), and processes triangles from those meshes.
Purge all the glyphs from the cache.
Convert a rect to a quad (losslessly).
Append a ‘quadto’ command to an open path. (For a quadratic bezier).
Read from a stream into a given data block.
Read all of a stream into a buffer.
Reads all bytes in an archive entry into a buffer.
Attempt to read a stream into a buffer. If truncated is NULL behaves as fz_read_all, sets a truncated flag in case of error.
Read all the contents of a file into a buffer.
Read a line from stream into the buffer until either a terminating newline or EOF, which it replaces with a null byte (‘\0’).
Read a null terminated string from the stream into a buffer of a given length. The buffer will be null terminated. Throws on failure (including the failure to fit the entire string including the terminator into the buffer).
fz_read_[u]int(16|24|32|64)(_le)?
Reallocates a block of memory to given size. Existing contents up to min(old_size,new_size) are maintained. The rest of the block is uninitialised.
fz_realloc equivalent that returns NULL rather than throwing exceptions.
Resolve a path to an absolute file name. The resolved path buffer must be of at least PATH_MAX size.
Given a magic find a document handler that can handle a document of this type.
Recognise image format strings in the first 8 bytes from image data.
Convert a bbox into a rect.
Convert a quad to the smallest rect that covers it.
Append a ‘rectto’ command to an open path.
Register a handler for a document type.
Register handlers for all the standard document types supported in this build.
Remove an item from the store.
Create a pixmap containing a rendered glyph.
Nasty PDF interpreter specific hernia, required to allow the interpreter to replay glyphs from a type3 font directly into the target device.
Map from enumerated rendering intent to string.
Ensure that a buffer has a given capacity, truncating data if required.
Resolve an internal link to a page number.
Resolve an internal link to a page number, location, and possible viewing parameters.
Create a rotation matrix.
Round rectangle coordinates.
(Re)-run a display list through a device.
Run a page through a device.
Run the annotations on a page through a device.
Run a page through a device. Just the main page content, without the annotations, if any.
Run the widgets on a page through a device.
Run a glyph from a Type3 font to a given device.
Compute the index of a rune in a string.
Count how many chars are required to represent a rune.
Obtain a pointer to the char representing the rune at a given index.
UTF8 encode a rune to a sequence of chars.
Save accelerator data for the document to a given file.
Save a bitmap as a pbm.
Save a bitmap as mono PCL.
Save a CMYK bitmap as a pkm.
Save a bitmap as a PWG.
Save the contents of a buffer to a file.
Save a pixmap as a pnm (greyscale, rgb or cmyk, with or without alpha).
Save a pixmap as a pbm. (Performing halftoning).
Save an (RGB) pixmap as color PCL.
Save a (Greyscale or RGB) pixmap as pclm.
Save a (Greyscale or RGB) pixmap as pdfocr.
Save a CMYK pixmap as a pkm. (Performing halftoning).
Save a (Greyscale or RGB) pixmap as a png.
Save a pixmap as a pnm (greyscale or rgb, no alpha).
Save a (gray, rgb, or cmyk, no alpha) pixmap out as postscript.
Save a pixmap as a PSD file.
Save a pixmap as a PWG.
Create a scaling matrix.
Search for the ‘needle’ text on the page. Record the hits in the hit_bbox array and return the number of hits. Will stop looking once it has filled hit_max rectangles.
Search for occurrence of ‘needle’ in text page.
Seek within a stream.
Seek to the specified file position. See fseek for arguments.
Test for the current behavior of a separation.
Get the equivalent separation color in a given colorspace.
Set the number of bits of antialiasing we should use (for both text and graphics).
Set new defaults within the default colorspace structure.
Set the error callback. This will be called as part of the exception handling.
Set the font bbox.
Set the number of bits of antialiasing we should use for graphics.
Set the minimum line width to be used for stroked lines.
Set the pixels per inch resolution of the pixmap.
Control the rendering of a given separation.
Set the output stream to be used for fz_stddbg. Set to NULL to reset to default (stderr).
Set the number of bits of antialiasing we should use for text.
Toggle whether to respect document styles in HTML and EPUB.
Set the user field in the context.
Set the user stylesheet source text for use with HTML and EPUB.
Set the warning callback. This will be called as part of the exception handling.
MD5 finalization. Ends an MD5 message-digest operation, writing the message digest and zeroizing the context.
SHA256 initialization. Begins an SHA256 operation, initialising the supplied context.
SHA256 block update operation. Continues an SHA256 message- digest operation, processing another message block, and updating the context.
SHA384 finalization. Ends an SHA384 message-digest operation, writing the message digest and zeroizing the context.
SHA384 initialization. Begins an SHA384 operation, initialising the supplied context.
SHA384 block update operation. Continues an SHA384 message- digest operation, processing another message block, and updating the context.
SHA512 finalization. Ends an SHA512 message-digest operation, writing the message digest and zeroizing the context.
SHA512 initialization. Begins an SHA512 operation, initialising the supplied context.
SHA512 block update operation. Continues an SHA512 message- digest operation, processing another message block, and updating the context.
Create a shearing matrix.
Add a glyph/unicode value to a text object.
Add a UTF8 string to a text object.
Evict items from the store until the total size of the objects in the store is reduced to a given percentage of its current size.
Read from a stream discarding data.
Skip over whitespace (bytes <= 32) in a stream.
Skip over a given string in a stream. Return 0 if successfully skipped, non-zero otherwise. As many characters will be skipped over as matched in the string.
The non va_list equivalent of fz_vsnprintf.
Retrieve an fz_output for the default debugging stream. On Windows this will be OutputDebugString for non-console apps. Otherwise, it is always fz_stderr.
Retrieve an fz_output that directs to stdout.
Retrieve an fz_output that directs to stdout.
Add an item to the store.
Internal function used as part of the scavenging allocator; when we fail to allocate memory, before returning a failure to the caller, we try to scavenge space within the store by evicting at least ‘size’ bytes. The allocator then retries.
External function for callers to use to scavenge while trying allocations.
Case insensitive (ASCII only) string comparison.
Portable strdup implementation, using fz allocators.
Obtain the fz_output in the form of a fz_stream.
Ensure that a buffer’s data ends in a 0 byte, and return a pointer to it.
Recover ISO 639 (639-{1,2,3,5}) language specification strings losslessly from a 15 bit fz_text_language code.
Concatenate 2 strings, with a maximum length.
Copy at most n-1 chars of a string into a destination buffer with null termination, returning the real length of the initial string (excluding terminator).
Return strlen(s), if that is less than maxlen, or maxlen if there is no null byte (‘\0’) among the first maxlen bytes.
Given a pointer to a C string (or a pointer to NULL) break it at the first occurrence of a delimiter char (from a given set).
Locale-independent decimal to binary conversion. On overflow return (-)INFINITY and set errno to ERANGE. On underflow return 0 and set errno to ERANGE. Special inputs (case insensitive): “NAN”, “INF” or “INFINITY”.
Perform subpixel quantisation and adjustment on a glyph matrix.
return the current reading position within a stream
Return the current file position.
Zero-terminate buffer in order to use as a C string.
Get the number of bits of antialiasing we are using for text. Between 0 and 8.
Convert ISO 639 (639-{1,2,3,5}) language specification strings losslessly to a 15 bit fz_text_language code.
Tint all the pixels in an RGB, BGR, or Gray pixmap.
Unicode aware tolower and toupper functions.
Create transform matrix to draw page at a given resolution and rotation. Adjusts the scaling factors so that the page covers whole number of pixels and adjust the page origin to be at 0,0.
Transform a path by a given matrix.
Apply a transformation to a point.
Transform a quad by a matrix.
Apply a transform to a rectangle.
Apply a transformation to a vector.
Create a translation matrix.
Translate bounding box.
Add a named buffer to an existing tree archive.
Add a named block of data to an existing tree archive.
Insert a new key/value pair and rebalance the tree. Return the new root of the tree after inserting and rebalancing. May be called with a NULL root to create a new tree.
Look for the value of a node in the tree with the given key.
Trim wasted capacity from a buffer by resizing internal memory.
Minimise the internal storage used by a path.
Truncate the output at the current position.
Attempt to create an inverse matrix.
Set the tuning function to use for image decode.
Set the tuning function to use for image scaling.
Compute union of two rectangles.
Given a reference to a (possibly) shared stroke_state structure, return a reference to an equivalent stroke_state structure that is guaranteed to be unshared (i.e. one that can safely be modified).
Given a reference to a (possibly) shared stroke_state structure, return a reference to a stroke_state structure (with room for a given amount of dash data) that is guaranteed to be unshared (i.e. one that can safely be modified).
decode url escapes.
Return whether to respect document styles in HTML and EPUB.
Read the user field from the context.
Get the user stylesheet source text.
Count how many runes the UTF-8 encoded string consists of.
A vsnprintf work-alike, using our custom formatter.
Walk the segments of a path, calling the appropriate callback function from a given set for each segment of the path.
Retrieve the currently set warning callback, or NULL if none has been set. Optionally, if user is non-NULL, the user pointer given when the warning callback was set is also passed back to the caller.
Cause a band writer to write the next band of data for an image.
Write a base64 encoded data block, optionally with periodic newlines.
Write a base64 encoded fz_buffer, optionally with periodic newlines.
Write a bitmap as a pbm.
Write a bitmap as mono PCL.
Write a CMYK bitmap as a pkm.
Write a bitmap as a PWG.
Write a bitmap as a PWG page.
Write num_bits of data to the end of the output stream, assumed to be packed most significant bits first.
Sync to byte boundary after writing bits.
Write data to output.
Convenience function to feed all the pages of a document to fz_begin_page/fz_run_page/fz_end_page.
Cause a band writer to write the header for a banded image with the given properties/dimensions etc. This also configures the bandwriter for the format of the data to be passed in future calls.
Write image as a data URI (for HTML and SVG output).
Write different sized data to an output stream.
Write a pixmap as a pnm (greyscale, rgb or cmyk, with or without alpha).
Write an (RGB) pixmap as color PCL.
Write a (Greyscale or RGB) pixmap as pclm.
Write a (Greyscale or RGB) pixmap as pdfocr.
Write a (Greyscale or RGB) pixmap as a png.
Write a pixmap as a pnm (greyscale or rgb, no alpha).
Write a (gray, rgb, or cmyk, no alpha) pixmap out as postscript.
Write a pixmap as a PSD file.
Write a pixmap as a PWG.
Write a pixmap as a PWG page.
Format and write data to an output stream. See fz_format_string for formatting details.
Write the file level header for ps band writer output.
Write the file level trailer for ps band writer output.
Output the file header to a pwg stream, ready for pages to follow it.
Write a UTF-8 encoded unicode character.
Write a string. Does not write zero terminator.
va_list version of fz_write_printf.
Given a buffer of data, (optionally) compress it, and add it to the zip file with the given name.
Add an attribute to an XML node.
Return the value of an attribute of an XML node. NULL if the attribute doesn’t exist.
Return the value of an attribute of an XML node. If the first attribute doesn’t exist, try the second. NULL if neither attribute exists.
Check for a matching attribute on an XML node.
Return first child of XML node.
Search the siblings of XML nodes starting with item looking for the first with the given tag.
Perform a depth first search from item, returning the first child that matches the given tag (or any tag if tag is NULL), with the given attribute (if att is non NULL), that matches match (if match is non NULL).
Search the siblings of XML nodes starting with the first child of item looking for the first with the given tag.
Search the siblings of XML nodes starting with the first child of item looking for the first with the given tag (or any tag if tag is NULL), and with a matching attribute.
Search the siblings of XML nodes starting with item looking for the first with the given tag (or any tag if tag is NULL), and with a matching attribute.
Search the siblings of XML nodes starting with the first sibling of item looking for the first with the given tag.
Perform a depth first search onwards from item, returning the first child that matches the given tag (or any tag if tag is NULL), with the given attribute (if att is non NULL), that matches match (if match is non NULL).
Search the siblings of XML nodes starting with the first sibling of item looking for the first with the given tag (or any tag if tag is NULL), and with a matching attribute.
Return true if the tag name matches.
Return next sibling of XML node.
Return previous sibling of XML node.
Return the topmost XML node of a document.
Return tag of XML node. Return NULL for text nodes.
Return the text content of an XML node. Return NULL if the node is a tag.
Return parent of XML node.
Compatibility decomposition of a codepoint.
Pairwise canonical composition of two codepoints. This includes Hangul Jamo composition (see chapter 3.12 of the Unicode core specification).
Pairwise canonical decomposition of a codepoint. This includes Hangul Jamo decomposition (see chapter 3.12 of the Unicode core specification).
Get bidirectional class of a codepoint.
Get combining class of a codepoint.
Get east-asian width of a codepoint.
Get general category of a codepoint.
Get unresolved linebreak class of a codepoint. This does not take rule LB1 of UAX#14 into account. See ucdn_get_resolved_linebreak_class() for resolved linebreak classes.
Check if codepoint can be mirrored.
Get resolved linebreak class of a codepoint. This resolves characters in the AI, SG, XX, SA and CJ classes according to rule LB1 of UAX#14. In addition the CB class is resolved as the equivalent B2 class and the NL class is resolved as the equivalent BK class.
Get script of a codepoint.
Return version of the Unicode database.
Mirror a codepoint.
Get paired bracket for a codepoint.
Get paired bracket type for a codepoint.

Type Definitions

Specifies the maximum size in bytes of the resource store in fz_context. Given as argument to fz_new_context.
FZ_UTFMAX: Maximum number of bytes in a decoded rune (maximum length returned by fz_chartorune).
The maximum number of colorants available in any given color/colorspace (not including alpha).
A fz_separation structure holds details of a set of separations (such as might be used on within a page of the document).
The shading code uses gouraud shaded triangle meshes.
FZ_STEXT_PRESERVE_LIGATURES: If this option is activated ligatures are passed through to the application in their original form. If this option is deactivated ligatures are expanded into their constituent parts, e.g. the ligature ffi is expanded into three separate characters f, f and i.
Prototype for callback function supplied to fz_bidi_fragment_text.
Type for a function to be called to attempt to authenticate a password. See fz_authenticate_password for more information.
Type for a function to be called to count the number of chapters in a document. See fz_count_chapters for more information.
Type for a function to be called to count the number of pages in a document. See fz_count_pages for more information.
Type for a function to be called when the reference count for the fz_document drops to 0. The implementation should release any resources held by the document. The actual document pointer will be freed by the caller.
Type for a function to be called to create an internal link to a destination (chapter/page/x/y/w/h/zoom/type tuple). See fz_resolve_link_dest for more information.
Type for a function to be called to see if a document grants a certain permission. See fz_document_has_permission for more information.
Type for a function to be called to lay out a document. See fz_layout_document for more information.
Type for a function to be called to load the outlines for a document. See fz_document_load_outline for more information.
Type for a function to load a given page from a document. See fz_load_page for more information.
Type for a function to lookup a bookmark. See fz_lookup_bookmark for more information.
Type for a function to query a document’s metadata. See fz_lookup_metadata for more information.
Type for a function to make a bookmark. See fz_make_bookmark for more information.
Type for a function to be called to enquire whether the document needs a password or not. See fz_needs_password for more information.
Function type to open a document from a file, with accelerator data.
Function type to open a document from a file, with accelerator data.
Function type to open a document from a file.
Function type to open a document from a file.
Type for a function to be called to obtain an outline iterator for a document. See fz_document_outline_iterator for more information.
Write document accelerator data
Return output intent color space if it exists
Recognize a document type from a magic string.
Type for a function to be called to resolve an internal link to a location (chapter/page number tuple). See fz_resolve_link_dest for more information.
Type for a function to set a document’s metadata. See fz_set_metadata for more information.
Function type to start the process of writing a page to a document.
Function type to end the process of writing pages to a document.
Function type to discard an fz_document_writer. This may be called at any time during the process to release all the resources owned by the writer.
Function type to end the process of writing a page to a document.
Function type to destroy an images data when it’s reference count reaches zero.
A callback called whenever an error message is generated. The user pointer passed to fz_set_error_callback() is passed along with the error message.
Function type called when a hash table entry is dropped.
Callback function called on each key/value pair in the hash table, when fz_hash_filter is run to remove entries where the callback returns true.
Callback function called on each key/value pair in the hash table, when fz_hash_for_each is run.
Function type to get a decoded pixmap for an image.
Function type to get the given storage size for an image.
Type for user supplied cjk font loading hook.
Type for user supplied fallback font loading hook.
Type for user supplied system font loading hook.
Function type for deleting the current item.
Function type for dropping the current iterator.
Function type for inserting a new item BEFORE the current point.
Function type for getting the current item.
Function types for moving the iterator position.
Function type for updating the current item properties according to the given item.
A function type for use when implementing fz_outputs. The supplied function of this type is called when the output stream is closed, to flush any pending writes.
A function type for use when implementing fz_outputs. The supplied function of this type is called when the output stream is dropped, to release the stream specific state information.
A function type for use when implementing fz_outputs. The supplied function of this type is called when fz_seek_output is requested.
A function type for use when implementing fz_outputs. The supplied function of this type is called when fz_tell_output is requested.
A function type for use when implementing fz_outputs. The supplied function of this type is called whenever data is written to the output.
Type for a function to return the bounding box of a page. See fz_bound_page for more information.
Type for a function to enable/ disable separations on a page. See fz_control_separation for more information.
Type for a function to create a link on a page.
Type for a function to delete a link on a page.
Type for a function to release all the resources held by a page. Called automatically when the reference count for that page reaches zero.
Type for a function to load the links from a page. See fz_load_links for more information.
Type for a function to obtain the details of how this page should be presented when in presentation mode. See fz_page_presentation for more information.
Type for a function to run the contents of a page. See fz_run_page_contents for more information.
Type for a function to detect whether a given separation is enabled or disabled on a page. See FZ_SEPARATION_DISABLED for more information.
Type for a function to retrieve details of separations on a page. See fz_get_separations for more information.
Type for a function to retrieve whether or not a given page uses overprint.
Used to report progress of the OCR operation.
Type for a function to be called when processing an already opened page. See fz_process_opened_pages.
Structure definition is public to enable stack based allocation. Do not access the members directly.
Callback function type for use with fz_process_shade.
Callback function type for use with fz_process_shade.
Function type for a function to drop a storable object.
Callback function called by fz_filter_store on every item within the store.
A function type for use when implementing fz_streams. The supplied function of this type is called when the stream is dropped, to release the stream specific state information.
A function type for use when implementing fz_outputs. The supplied function of this type is called when the fz_stream_from_output is called.
A function type for use when implementing fz_streams. The supplied function of this type is called whenever data is required, and the current buffer is empty.
A function type for use when implementing fz_streams. The supplied function of this type is called when fz_seek is requested, and the arguments are as defined for fz_seek.
A function type for use when implementing fz_outputs. The supplied function of this type is called when fz_truncate_output is called to truncate the file at that point.
Given the width and height of an image, the subsample factor, and the subarea of the image actually required, the caller can decide whether to decode the whole image or just a subarea.
Given the source width and height of image, together with the actual required width and height, decide whether we should use mitchell scaling.
A callback called whenever a warning message is generated. The user pointer passed to fz_set_warning_callback() is passed along with the warning message.

Unions