PDF files are made up of a series of objects. These objects can be in many different types, including dictionaries, streams, numbers, booleans, names, strings etc. For full details, see `The PDF Reference Manual'.
MuPDF represents all of these as a pdf_obj pointer. Such pointers are reference counted in the usual way:
Given such a pointer, the actual type of the object can be obtained using:
These all return non-zero if the object is of the tested type, and zero otherwise.
To extract the data from a PDF object, you can use one of the following functions:
It is, in fact, safe to call any of these functions on any pdf_obj pointer. If the object is not of the expected type, a `safe' default will be returned.