![]() |
![]() |
![]() |
GXPS Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <libgxps/gxps.h> struct GXPSDocument; guint gxps_document_get_n_pages (GXPSDocument *doc
); GXPSPage * gxps_document_get_page (GXPSDocument *doc
,guint n_page
,GError **error
); gboolean gxps_document_get_page_size (GXPSDocument *doc
,guint n_page
,guint *width
,guint *height
); gint gxps_document_get_page_for_anchor (GXPSDocument *doc
,const gchar *anchor
); GXPSDocumentStructure * gxps_document_get_structure (GXPSDocument *doc
);
GXPSDocument represents a document in a GXPSFile. GXPSDocument
objects can not be created directly, they are retrieved from a
GXPSFile with gxps_file_get_document()
.
struct GXPSDocument { GObject parent; };
The GXPSDocument struct contains only private fields and should not be directly accessed.
guint gxps_document_get_n_pages (GXPSDocument *doc
);
Gets the number of pages in doc
.
|
a GXPSDocument |
Returns : |
the number of pages. |
GXPSPage * gxps_document_get_page (GXPSDocument *doc
,guint n_page
,GError **error
);
Creates a new GXPSPage representing the page at
index n_doc
in doc
document.
|
a GXPSDocument |
|
the index of the page to get |
|
GError for error reporting, or NULL to ignore |
Returns : |
a new GXPSPage or NULL on error.
Free the returned object with g_object_unref() . [transfer full]
|
gboolean gxps_document_get_page_size (GXPSDocument *doc
,guint n_page
,guint *width
,guint *height
);
Gets the size of the page at index n_page
in doc
document.
This function is useful to get the size of the pages in a document
without creating GXPSPage objects. To get the size of a GXPSPage
you can use gxps_page_get_size()
instead.
|
a GXPSDocument |
|
the index of a page in doc
|
|
return location for the width of n_page . [out][allow-none]
|
|
return location for the height of n_page . [out][allow-none]
|
gint gxps_document_get_page_for_anchor (GXPSDocument *doc
,const gchar *anchor
);
Gets the index of the page in doc
where the given
anchor is.
|
a GXPSDocument |
|
the name of an anchor |
Returns : |
the page index of the given anchor. |
GXPSDocumentStructure * gxps_document_get_structure (GXPSDocument *doc
);
Creates a new GXPSDocumentStructure representing the document
structure of doc
.
|
a a GXPSDocument |
Returns : |
a new GXPSDocumentStructure or NULL if document doesn't have a structure.
Free the returned object with g_object_unref() . [transfer full]
|