Top | ![]() |
![]() |
![]() |
![]() |
GXPSFile represents a XPS file. A GXPSFile is a set of one or more
documents, you can get the amount of documents contained in the set
with gxps_file_get_n_documents()
. Documents can be retrieved by their
index in the set with gxps_file_get_document()
.
guint
gxps_file_get_n_documents (GXPSFile *xps
);
Gets the number of documents in xps
.
GXPSDocument * gxps_file_get_document (GXPSFile *xps
,guint n_doc
,GError **error
);
Creates a new GXPSDocument representing the document at
index n_doc
in xps
file.
a new GXPSDocument or NULL
on error.
Free the returned object with g_object_unref()
.
[transfer full]
gint gxps_file_get_document_for_link_target (GXPSFile *xps
,GXPSLinkTarget *target
);
Gets the index of the document in xps
pointed by target
.
If the GXPSLinkTarget does not reference a document, or
referenced document is not found in xps
file -1 will be
returned. In this case you can look for the page pointed by
the link target by calling gxps_document_get_page_for_anchor()
with the anchor of the GXPSLinkTarget for every document in
xps
.
GXPSCoreProperties * gxps_file_get_core_properties (GXPSFile *xps
,GError **error
);
Create a GXPSCoreProperties object containing the metadata
of xpsm
, or NULL
in case of error or if the GXPSFile
doesn't contain core properties.
a new GXPSCoreProperties or NULL
.
Free the returned object with g_object_unref()
.
[transfer full]
struct GXPSFile;
The GXPSFile struct contains only private fields and should not be directly accessed.
#define GXPS_FILE_ERROR (gxps_file_error_quark ())
Error domain for GXPSFile. Errors in this domain will be from the GXPSFileError enumeration. See GError for more information on error domains.