PopplerDocument

PopplerDocument — Information about a document

Functions

GTree * poppler_document_create_dests_tree ()
PopplerDest * poppler_document_find_dest ()
GList * poppler_document_get_attachments ()
gchar * poppler_document_get_author ()
time_t poppler_document_get_creation_date ()
GDateTime * poppler_document_get_creation_date_time ()
gchar * poppler_document_get_creator ()
PopplerFormField * poppler_document_get_form_field ()
gboolean poppler_document_get_id ()
gchar * poppler_document_get_keywords ()
gchar * poppler_document_get_metadata ()
time_t poppler_document_get_modification_date ()
GDateTime * poppler_document_get_modification_date_time ()
guint poppler_document_get_n_attachments ()
int poppler_document_get_n_pages ()
gint poppler_document_get_n_signatures ()
PopplerPage * poppler_document_get_page ()
PopplerPage * poppler_document_get_page_by_label ()
PopplerPageLayout poppler_document_get_page_layout ()
PopplerPageMode poppler_document_get_page_mode ()
PopplerPDFConformance poppler_document_get_pdf_conformance ()
PopplerPDFPart poppler_document_get_pdf_part ()
PopplerPDFSubtype poppler_document_get_pdf_subtype ()
gchar * poppler_document_get_pdf_subtype_string ()
void poppler_document_get_pdf_version ()
gchar * poppler_document_get_pdf_version_string ()
PopplerPermissions poppler_document_get_permissions ()
PopplerPrintDuplex poppler_document_get_print_duplex ()
gint poppler_document_get_print_n_copies ()
PopplerPageRange * poppler_document_get_print_page_ranges ()
PopplerPrintScaling poppler_document_get_print_scaling ()
gchar * poppler_document_get_producer ()
GList * poppler_document_get_signature_fields ()
gchar * poppler_document_get_subject ()
gchar * poppler_document_get_title ()
gboolean poppler_document_has_attachments ()
gboolean poppler_document_has_javascript ()
gboolean poppler_document_is_linearized ()
PopplerDocument * poppler_document_new_from_bytes ()
PopplerDocument * poppler_document_new_from_data ()
PopplerDocument * poppler_document_new_from_fd ()
PopplerDocument * poppler_document_new_from_file ()
PopplerDocument * poppler_document_new_from_gfile ()
PopplerDocument * poppler_document_new_from_stream ()
void poppler_document_reset_form ()
gboolean poppler_document_save ()
gboolean poppler_document_save_a_copy ()
gboolean poppler_document_save_to_fd ()
void poppler_document_set_author ()
void poppler_document_set_creation_date ()
void poppler_document_set_creation_date_time ()
void poppler_document_set_creator ()
void poppler_document_set_keywords ()
void poppler_document_set_modification_date ()
void poppler_document_set_modification_date_time ()
void poppler_document_set_producer ()
void poppler_document_set_subject ()
void poppler_document_set_title ()
void poppler_font_info_free ()
PopplerFontInfo * poppler_font_info_new ()
gboolean poppler_font_info_scan ()
PopplerFontsIter * poppler_fonts_iter_copy ()
void poppler_fonts_iter_free ()
const char * poppler_fonts_iter_get_encoding ()
const char * poppler_fonts_iter_get_file_name ()
PopplerFontType poppler_fonts_iter_get_font_type ()
const char * poppler_fonts_iter_get_full_name ()
const char * poppler_fonts_iter_get_name ()
const char * poppler_fonts_iter_get_substitute_name ()
gboolean poppler_fonts_iter_is_embedded ()
gboolean poppler_fonts_iter_is_subset ()
gboolean poppler_fonts_iter_next ()
PopplerIndexIter * poppler_index_iter_copy ()
void poppler_index_iter_free ()
PopplerAction * poppler_index_iter_get_action ()
PopplerIndexIter * poppler_index_iter_get_child ()
gboolean poppler_index_iter_is_open ()
PopplerIndexIter * poppler_index_iter_new ()
gboolean poppler_index_iter_next ()
PopplerLayersIter * poppler_layers_iter_copy ()
void poppler_layers_iter_free ()
PopplerLayersIter * poppler_layers_iter_get_child ()
PopplerLayer * poppler_layers_iter_get_layer ()
gchar * poppler_layers_iter_get_title ()
PopplerLayersIter * poppler_layers_iter_new ()
gboolean poppler_layers_iter_next ()
void poppler_ps_file_free ()
PopplerPSFile * poppler_ps_file_new ()
PopplerPSFile * poppler_ps_file_new_fd ()
void poppler_ps_file_set_duplex ()
void poppler_ps_file_set_paper_size ()

Properties

char * author Read / Write
int creation-date Read / Write
GDateTime * creation-datetime Read / Write
char * creator Read / Write
char * format Read
guint format-major Read
guint format-minor Read
char * keywords Read / Write
gboolean linearized Read
char * metadata Read
int mod-date Read / Write
GDateTime * mod-datetime Read / Write
PopplerPageLayout page-layout Read
PopplerPageMode page-mode Read
PopplerPermissions permissions Read
PopplerPrintDuplex print-duplex Read
int print-n-copies Read
PopplerPrintScaling print-scaling Read
char * producer Read / Write
char * subject Read / Write
PopplerPDFSubtype subtype Read
PopplerPDFConformance subtype-conformance Read
PopplerPDFPart subtype-part Read
char * subtype-string Read
char * title Read / Write
PopplerViewerPreferences viewer-preferences Read

Types and Values

Object Hierarchy

    GBoxed
    ├── PopplerFontsIter
    ├── PopplerIndexIter
    ╰── PopplerLayersIter
    GEnum
    ├── PopplerFontType
    ├── PopplerPDFConformance
    ├── PopplerPDFPart
    ├── PopplerPDFSubtype
    ├── PopplerPageLayout
    ├── PopplerPageMode
    ├── PopplerPrintDuplex
    ╰── PopplerPrintScaling
    GFlags
    ├── PopplerPermissions
    ╰── PopplerViewerPreferences
    GObject
    ├── PopplerDocument
    ├── PopplerFontInfo
    ╰── PopplerPSFile

Includes

#include <poppler.h>

Description

The PopplerDocument is an object used to refer to a main document.

Functions

poppler_document_create_dests_tree ()

GTree *
poppler_document_create_dests_tree (PopplerDocument *document);

Creates a balanced binary tree of all named destinations in document

The tree key is strings in the form returned by poppler_named_dest_to_bytestring() which constains a destination name. The tree value is the PopplerDest which contains a named destination. The return value must be freed with g_tree_destroy().

Parameters

document

A PopplerDocument

 

Returns

the GTree, or NULL.

[transfer full][nullable]

Since: 0.78


poppler_document_find_dest ()

PopplerDest *
poppler_document_find_dest (PopplerDocument *document,
                            const gchar *link_name);

Creates a PopplerDest for the named destination link_name in document .

Note that named destinations are bytestrings, not string. That means that unless link_name was returned by a poppler function (e.g. is PopplerDest.named_dest), it needs to be converted to string using poppler_named_dest_from_bytestring() before being passed to this function.

The returned value must be freed with poppler_dest_free().

Parameters

document

A PopplerDocument

 

link_name

a named destination

 

Returns

a new PopplerDest destination, or NULL if link_name is not a destination.

[transfer full]


poppler_document_get_attachments ()

GList *
poppler_document_get_attachments (PopplerDocument *document);

Returns a GList containing PopplerAttachments. These attachments are unowned, and must be unreffed, and the list must be freed with g_list_free().

Parameters

document

A PopplerDocument

 

Returns

a list of available attachments.

[element-type PopplerAttachment][transfer full]


poppler_document_get_author ()

gchar *
poppler_document_get_author (PopplerDocument *document);

Returns the author of the document

Parameters

document

A PopplerDocument

 

Returns

a new allocated string containing the author of document , or NULL

Since: 0.16


poppler_document_get_creation_date ()

time_t
poppler_document_get_creation_date (PopplerDocument *document);

Returns the date the document was created as seconds since the Epoch

Parameters

document

A PopplerDocument

 

Returns

the date the document was created, or -1

Since: 0.16


poppler_document_get_creation_date_time ()

GDateTime *
poppler_document_get_creation_date_time
                               (PopplerDocument *document);

Returns the date the document was created as a GDateTime

Parameters

document

A PopplerDocument

 

Returns

the date the document was created, or NULL.

[nullable]

Since: 20.09.0


poppler_document_get_creator ()

gchar *
poppler_document_get_creator (PopplerDocument *document);

Returns the creator of the document. If the document was converted from another format, the creator is the name of the product that created the original document from which it was converted.

Parameters

document

A PopplerDocument

 

Returns

a new allocated string containing the creator of document , or NULL

Since: 0.16


poppler_document_get_form_field ()

PopplerFormField *
poppler_document_get_form_field (PopplerDocument *document,
                                 gint id);

Returns the PopplerFormField for the given id . It must be freed with g_object_unref()

Parameters

document

a PopplerDocument

 

id

an id of a PopplerFormField

 

Returns

a new PopplerFormField or NULL if not found.

[transfer full]


poppler_document_get_id ()

gboolean
poppler_document_get_id (PopplerDocument *document,
                         gchar **permanent_id,
                         gchar **update_id);

Returns the PDF file identifier represented as two byte string arrays of size 32. permanent_id is the permanent identifier that is built based on the file contents at the time it was originally created, so that this identifer never changes. update_id is the update identifier that is built based on the file contents at the time it was last updated.

Note that returned strings are not null-terminated, they have a fixed size of 32 bytes.

Parameters

document

A PopplerDocument

 

permanent_id

location to store an allocated string, use g_free() to free the returned string.

[out][allow-none]

update_id

location to store an allocated string, use g_free() to free the returned string.

[out][allow-none]

Returns

TRUE if the document contains an id, FALSE otherwise

Since: 0.16


poppler_document_get_keywords ()

gchar *
poppler_document_get_keywords (PopplerDocument *document);

Returns the keywords associated to the document

Parameters

document

A PopplerDocument

 

Returns

a new allocated string containing keywords associated to document , or NULL

Since: 0.16


poppler_document_get_metadata ()

gchar *
poppler_document_get_metadata (PopplerDocument *document);

Returns the XML metadata string of the document

Parameters

document

A PopplerDocument

 

Returns

a new allocated string containing the XML metadata, or NULL

Since: 0.16


poppler_document_get_modification_date ()

time_t
poppler_document_get_modification_date
                               (PopplerDocument *document);

Returns the date the document was most recently modified as seconds since the Epoch

Parameters

document

A PopplerDocument

 

Returns

the date the document was most recently modified, or -1

Since: 0.16


poppler_document_get_modification_date_time ()

GDateTime *
poppler_document_get_modification_date_time
                               (PopplerDocument *document);

Returns the date the document was most recently modified as a GDateTime

Parameters

document

A PopplerDocument

 

Returns

the date the document was modified, or NULL.

[nullable]

Since: 20.09.0


poppler_document_get_n_attachments ()

guint
poppler_document_get_n_attachments (PopplerDocument *document);

Returns the number of attachments in a loaded document. See also poppler_document_get_attachments()

Parameters

document

A PopplerDocument

 

Returns

Number of attachments

Since: 0.18


poppler_document_get_n_pages ()

int
poppler_document_get_n_pages (PopplerDocument *document);

Returns the number of pages in a loaded document.

Parameters

document

A PopplerDocument

 

Returns

Number of pages


poppler_document_get_n_signatures ()

gint
poppler_document_get_n_signatures (const PopplerDocument *document);

Returns how many digital signatures document contains. PDF digital signatures ensure that the content hash not been altered since last edit and that it was produced by someone the user can trust

Parameters

document

A PopplerDocument

 

Returns

The number of signatures found in the document

Since: 21.12.0


poppler_document_get_page ()

PopplerPage *
poppler_document_get_page (PopplerDocument *document,
                           int index);

Returns the PopplerPage indexed at index . This object is owned by the caller.

Parameters

document

A PopplerDocument

 

index

a page index

 

Returns

(transfer full) : The PopplerPage at index


poppler_document_get_page_by_label ()

PopplerPage *
poppler_document_get_page_by_label (PopplerDocument *document,
                                    const char *label);

Returns the PopplerPage reference by label . This object is owned by the caller. label is a human-readable string representation of the page number, and can be document specific. Typically, it is a value such as "iii" or "3".

By default, "1" refers to the first page.

Parameters

document

A PopplerDocument

 

label

a page label

 

Returns

(transfer full) :The PopplerPage referenced by label


poppler_document_get_page_layout ()

PopplerPageLayout
poppler_document_get_page_layout (PopplerDocument *document);

Returns the page layout that should be used when the document is opened

Parameters

document

A PopplerDocument

 

Returns

a PopplerPageLayout that should be used when the document is opened

Since: 0.16


poppler_document_get_page_mode ()

PopplerPageMode
poppler_document_get_page_mode (PopplerDocument *document);

Returns a PopplerPageMode representing how the document should be initially displayed when opened.

Parameters

document

A PopplerDocument

 

Returns

a PopplerPageMode that should be used when document is opened

Since: 0.16


poppler_document_get_pdf_conformance ()

PopplerPDFConformance
poppler_document_get_pdf_conformance (PopplerDocument *document);

Returns the conformance level of the document as PopplerPDFConformance.

Parameters

document

A PopplerDocument

 

Returns

the document's subtype conformance level

Since: 0.70


poppler_document_get_pdf_part ()

PopplerPDFPart
poppler_document_get_pdf_part (PopplerDocument *document);

Returns the part of the conforming standard that the document adheres to as a PopplerPDFSubtype.

Parameters

document

A PopplerDocument

 

Returns

the document's subtype part

Since: 0.70


poppler_document_get_pdf_subtype ()

PopplerPDFSubtype
poppler_document_get_pdf_subtype (PopplerDocument *document);

Returns the subtype of document as a PopplerPDFSubtype.

Parameters

document

A PopplerDocument

 

Returns

the document's subtype

Since: 0.70


poppler_document_get_pdf_subtype_string ()

gchar *
poppler_document_get_pdf_subtype_string
                               (PopplerDocument *document);

Returns the PDF subtype version of document as a string.

Parameters

document

A PopplerDocument

 

Returns

a newly allocated string containing the PDF subtype version of document , or NULL.

[transfer full][nullable]

Since: 0.70


poppler_document_get_pdf_version ()

void
poppler_document_get_pdf_version (PopplerDocument *document,
                                  guint *major_version,
                                  guint *minor_version);

Updates values referenced by major_version & minor_version with the major and minor PDF versions of document .

Parameters

document

A PopplerDocument

 

major_version

return location for the PDF major version number.

[out][nullable]

minor_version

return location for the PDF minor version number.

[out][nullable]

Since: 0.16


poppler_document_get_pdf_version_string ()

gchar *
poppler_document_get_pdf_version_string
                               (PopplerDocument *document);

Returns the PDF version of document as a string (e.g. PDF-1.6)

Parameters

document

A PopplerDocument

 

Returns

a new allocated string containing the PDF version of document , or NULL

Since: 0.16


poppler_document_get_permissions ()

PopplerPermissions
poppler_document_get_permissions (PopplerDocument *document);

Returns the flags specifying which operations are permitted when the document is opened.

Parameters

document

A PopplerDocument

 

Returns

a set of flags from PopplerPermissions enumeration

Since: 0.16


poppler_document_get_print_duplex ()

PopplerPrintDuplex
poppler_document_get_print_duplex (PopplerDocument *document);

Returns the duplex mode value suggested for printing by author of the document. Value POPPLER_PRINT_DUPLEX_NONE means that the document does not specify this preference.

Parameters

document

A PopplerDocument

 

Returns

a PopplerPrintDuplex that should be used when document is printed

Since: 0.80


poppler_document_get_print_n_copies ()

gint
poppler_document_get_print_n_copies (PopplerDocument *document);

Returns the suggested number of copies to be printed. This preference should be applied only if returned value is greater than 1 since value 1 usually means that the document does not specify it.

Parameters

document

A PopplerDocument

 

Returns

Number of copies

Since: 0.80


poppler_document_get_print_page_ranges ()

PopplerPageRange *
poppler_document_get_print_page_ranges
                               (PopplerDocument *document,
                                int *n_ranges);

Returns the suggested page ranges to print in the form of array of PopplerPageRanges and number of ranges. NULL pointer means that the document does not specify page ranges for printing.

Parameters

document

A PopplerDocument

 

n_ranges

return location for number of ranges.

[out]

Returns

an array of PopplerPageRanges or NULL. Free the array when it is no longer needed.

[array length=n_ranges][transfer full]

Since: 0.80


poppler_document_get_print_scaling ()

PopplerPrintScaling
poppler_document_get_print_scaling (PopplerDocument *document);

Returns the print scaling value suggested by author of the document.

Parameters

document

A PopplerDocument

 

Returns

a PopplerPrintScaling that should be used when document is printed

Since: 0.73


poppler_document_get_producer ()

gchar *
poppler_document_get_producer (PopplerDocument *document);

Returns the producer of the document. If the document was converted from another format, the producer is the name of the product that converted it to PDF

Parameters

document

A PopplerDocument

 

Returns

a new allocated string containing the producer of document , or NULL

Since: 0.16


poppler_document_get_signature_fields ()

GList *
poppler_document_get_signature_fields (PopplerDocument *document);

Returns a GList containing all signature PopplerFormFields in the document.

Parameters

document

A PopplerDocument

 

Returns

a list of all signature form fields.

[element-type PopplerFormField][transfer full]

Since: 22.02.0


poppler_document_get_subject ()

gchar *
poppler_document_get_subject (PopplerDocument *document);

Returns the subject of the document

Parameters

document

A PopplerDocument

 

Returns

a new allocated string containing the subject of document , or NULL

Since: 0.16


poppler_document_get_title ()

gchar *
poppler_document_get_title (PopplerDocument *document);

Returns the document's title

Parameters

document

A PopplerDocument

 

Returns

a new allocated string containing the title of document , or NULL

Since: 0.16


poppler_document_has_attachments ()

gboolean
poppler_document_has_attachments (PopplerDocument *document);

Returns TRUE of document has any attachments.

Parameters

document

A PopplerDocument

 

Returns

TRUE, if document has attachments.


poppler_document_has_javascript ()

gboolean
poppler_document_has_javascript (PopplerDocument *document);

Returns whether document has any javascript in it.

Parameters

document

A PopplerDocument

 

Since: 0.90


poppler_document_is_linearized ()

gboolean
poppler_document_is_linearized (PopplerDocument *document);

Returns whether document is linearized or not. Linearization of PDF enables efficient incremental access of the PDF file in a network environment.

Parameters

document

A PopplerDocument

 

Returns

TRUE if document is linearized, FALSE otherwise

Since: 0.16


poppler_document_new_from_bytes ()

PopplerDocument *
poppler_document_new_from_bytes (GBytes *bytes,
                                 const char *password,
                                 GError **error);

Creates a new PopplerDocument from bytes . The returned document will hold a reference to bytes .

On error, NULL is returned, with error set. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains.

Parameters

bytes

a GBytes

 

password

password to unlock the file with, or NULL.

[allow-none]

error

Return location for an error, or NULL.

[allow-none]

Returns

a newly created PopplerDocument, or NULL.

[transfer full]

Since: 0.82


poppler_document_new_from_data ()

PopplerDocument *
poppler_document_new_from_data (char *data,
                                int length,
                                const char *password,
                                GError **error);

poppler_document_new_from_data has been deprecated since version 0.82 and should not be used in newly-written code.

This requires directly managing length and data . Use poppler_document_new_from_bytes() instead.

Creates a new PopplerDocument. If NULL is returned, then error will be set. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains.

Note that data is not copied nor is a new reference to it created. It must remain valid and cannot be destroyed as long as the returned document exists.

Parameters

data

the pdf data.

[array length=length][element-type guint8]

length

the length of data

 

password

password to unlock the file with, or NULL.

[nullable]

error

Return location for an error, or NULL.

[nullable]

Returns

A newly created PopplerDocument, or NULL


poppler_document_new_from_fd ()

PopplerDocument *
poppler_document_new_from_fd (int fd,
                              const char *password,
                              GError **error);

Creates a new PopplerDocument reading the PDF contents from the file descriptor fd . fd must refer to a regular file, or STDIN, and be open for reading. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains. Note that this function takes ownership of fd ; you must not operate on it again, nor close it.

Parameters

fd

a valid file descriptor

 

password

password to unlock the file with, or NULL.

[allow-none]

error

Return location for an error, or NULL.

[allow-none]

Returns

a new PopplerDocument, or NULL.

[transfer full]

Since: 21.12.0


poppler_document_new_from_file ()

PopplerDocument *
poppler_document_new_from_file (const char *uri,
                                const char *password,
                                GError **error);

Creates a new PopplerDocument. If NULL is returned, then error will be set. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains.

Parameters

uri

uri of the file to load

 

password

password to unlock the file with, or NULL.

[allow-none]

error

Return location for an error, or NULL.

[allow-none]

Returns

A newly created PopplerDocument, or NULL


poppler_document_new_from_gfile ()

PopplerDocument *
poppler_document_new_from_gfile (GFile *file,
                                 const char *password,
                                 GCancellable *cancellable,
                                 GError **error);

Creates a new PopplerDocument reading the PDF contents from file . Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains.

Parameters

file

a GFile to load

 

password

password to unlock the file with, or NULL.

[allow-none]

cancellable

a GCancellable, or NULL.

[allow-none]

error

Return location for an error, or NULL.

[allow-none]

Returns

a new PopplerDocument, or NULL.

[transfer full]

Since: 0.22


poppler_document_new_from_stream ()

PopplerDocument *
poppler_document_new_from_stream (GInputStream *stream,
                                  goffset length,
                                  const char *password,
                                  GCancellable *cancellable,
                                  GError **error);

Creates a new PopplerDocument reading the PDF contents from stream . Note that the given GInputStream must be seekable or G_IO_ERROR_NOT_SUPPORTED will be returned. Possible errors include those in the POPPLER_ERROR, G_FILE_ERROR and G_IO_ERROR domains.

Parameters

stream

a GInputStream to read from

 

length

the stream length, or -1 if not known

 

password

password to unlock the file with, or NULL.

[allow-none]

cancellable

a GCancellable, or NULL.

[allow-none]

error

Return location for an error, or NULL.

[allow-none]

Returns

a new PopplerDocument, or NULL.

[transfer full]

Since: 0.22


poppler_document_reset_form ()

void
poppler_document_reset_form (PopplerDocument *document,
                             GList *fields,
                             gboolean exclude_fields);

Resets the form fields specified by fields if exclude_fields is FALSE. Resets all others if exclude_fields is TRUE. All form fields are reset regardless of the exclude_fields flag if fields is empty.

Parameters

document

A PopplerDocument

 

fields

list of fields to reset.

[element-type utf8][nullable]

exclude_fields

whether to reset all fields except those in fields

 

Since: 0.90


poppler_document_save ()

gboolean
poppler_document_save (PopplerDocument *document,
                       const char *uri,
                       GError **error);

Saves document . Any change made in the document such as form fields filled, annotations added or modified will be saved. If error is set, FALSE will be returned. Possible errors include those in the G_FILE_ERROR domain.

Parameters

document

a PopplerDocument

 

uri

uri of file to save

 

error

return location for an error, or NULL.

[allow-none]

Returns

TRUE, if the document was successfully saved


poppler_document_save_a_copy ()

gboolean
poppler_document_save_a_copy (PopplerDocument *document,
                              const char *uri,
                              GError **error);

Saves a copy of the original document . Any change made in the document such as form fields filled by the user will not be saved. If error is set, FALSE will be returned. Possible errors include those in the G_FILE_ERROR domain.

Parameters

document

a PopplerDocument

 

uri

uri of file to save

 

error

return location for an error, or NULL.

[allow-none]

Returns

TRUE, if the document was successfully saved


poppler_document_save_to_fd ()

gboolean
poppler_document_save_to_fd (PopplerDocument *document,
                             int fd,
                             gboolean include_changes,
                             GError **error);

Saves document . Any change made in the document such as form fields filled, annotations added or modified will be saved if include_changes is TRUE, or discarded i include_changes is FALSE.

Note that this function takes ownership of fd ; you must not operate on it again, nor close it.

If error is set, FALSE will be returned. Possible errors include those in the G_FILE_ERROR domain.

Parameters

document

a PopplerDocument

 

fd

a valid file descriptor open for writing

 

include_changes

whether to include user changes (e.g. form fills)

 

error

return location for an error, or NULL.

[allow-none]

Returns

TRUE, if the document was successfully saved

Since: 21.12.0


poppler_document_set_author ()

void
poppler_document_set_author (PopplerDocument *document,
                             const gchar *author);

Sets the document's author. If author is NULL, Author entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

author

A new author

 

Since: 0.46


poppler_document_set_creation_date ()

void
poppler_document_set_creation_date (PopplerDocument *document,
                                    time_t creation_date);

Sets the document's creation date. If creation_date is -1, CreationDate entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

creation_date

A new creation date

 

Since: 0.46


poppler_document_set_creation_date_time ()

void
poppler_document_set_creation_date_time
                               (PopplerDocument *document,
                                GDateTime *creation_datetime);

Sets the document's creation date. If creation_datetime is NULL, CreationDate entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

creation_datetime

A new creation GDateTime.

[nullable]

Since: 20.09.0


poppler_document_set_creator ()

void
poppler_document_set_creator (PopplerDocument *document,
                              const gchar *creator);

Sets the document's creator. If creator is NULL, Creator entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

creator

A new creator

 

Since: 0.46


poppler_document_set_keywords ()

void
poppler_document_set_keywords (PopplerDocument *document,
                               const gchar *keywords);

Sets the document's keywords. If keywords is NULL, Keywords entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

keywords

New keywords

 

Since: 0.46


poppler_document_set_modification_date ()

void
poppler_document_set_modification_date
                               (PopplerDocument *document,
                                time_t modification_date);

Sets the document's modification date. If modification_date is -1, ModDate entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

modification_date

A new modification date

 

Since: 0.46


poppler_document_set_modification_date_time ()

void
poppler_document_set_modification_date_time
                               (PopplerDocument *document,
                                GDateTime *modification_datetime);

Sets the document's modification date. If modification_datetime is NULL, ModDate entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

modification_datetime

A new modification GDateTime.

[nullable]

Since: 20.09.0


poppler_document_set_producer ()

void
poppler_document_set_producer (PopplerDocument *document,
                               const gchar *producer);

Sets the document's producer. If producer is NULL, Producer entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

producer

A new producer

 

Since: 0.46


poppler_document_set_subject ()

void
poppler_document_set_subject (PopplerDocument *document,
                              const gchar *subject);

Sets the document's subject. If subject is NULL, Subject entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

subject

A new subject

 

Since: 0.46


poppler_document_set_title ()

void
poppler_document_set_title (PopplerDocument *document,
                            const gchar *title);

Sets the document's title. If title is NULL, Title entry is removed from the document's Info dictionary.

Parameters

document

A PopplerDocument

 

title

A new title

 

Since: 0.46


poppler_font_info_free ()

void
poppler_font_info_free (PopplerFontInfo *font_info);

poppler_font_info_new ()

PopplerFontInfo *
poppler_font_info_new (PopplerDocument *document);

Creates a new PopplerFontInfo object

Parameters

document

a PopplerDocument

 

Returns

a new PopplerFontInfo instance


poppler_font_info_scan ()

gboolean
poppler_font_info_scan (PopplerFontInfo *font_info,
                        int n_pages,
                        PopplerFontsIter **iter);

Scans the document associated with font_info for fonts. At most n_pages will be scanned starting from the current iterator. iter will point to the first font scanned.

Here is a simple example of code to scan fonts in a document

1
2
3
4
5
6
7
8
9
10
11
12
13
font_info = poppler_font_info_new (document);
scanned_pages = 0;
while (scanned_pages <= poppler_document_get_n_pages(document)) {
        poppler_font_info_scan (font_info, 20, &fonts_iter);
        scanned_pages += 20;
        if (!fonts_iter)
                continue; /* No fonts found in these 20 pages */
        do {
                /* Do something with font iter */
                g_print ("Font Name: %s\n", poppler_fonts_iter_get_name (fonts_iter));
        } while (poppler_fonts_iter_next (fonts_iter));
        poppler_fonts_iter_free (fonts_iter);
}

Parameters

font_info

a PopplerFontInfo

 

n_pages

number of pages to scan

 

iter

return location for a PopplerFontsIter.

[out]

Returns

TRUE, if fonts were found


poppler_fonts_iter_copy ()

PopplerFontsIter *
poppler_fonts_iter_copy (PopplerFontsIter *iter);

Creates a copy of iter

Parameters

iter

a PopplerFontsIter to copy

 

Returns

a new allocated copy of iter


poppler_fonts_iter_free ()

void
poppler_fonts_iter_free (PopplerFontsIter *iter);

Frees the given PopplerFontsIter

Parameters

iter

a PopplerFontsIter

 

poppler_fonts_iter_get_encoding ()

const char *
poppler_fonts_iter_get_encoding (PopplerFontsIter *iter);

Returns the encoding of the font associated with iter

Parameters

iter

a PopplerFontsIter

 

Returns

the font encoding

Since: 0.20


poppler_fonts_iter_get_file_name ()

const char *
poppler_fonts_iter_get_file_name (PopplerFontsIter *iter);

The filename of the font associated with iter or NULL if the font is embedded

Parameters

iter

a PopplerFontsIter

 

Returns

the filename of the font or NULL if font is embedded


poppler_fonts_iter_get_font_type ()

PopplerFontType
poppler_fonts_iter_get_font_type (PopplerFontsIter *iter);

Returns the type of the font associated with iter

Parameters

iter

a PopplerFontsIter

 

Returns

the font type


poppler_fonts_iter_get_full_name ()

const char *
poppler_fonts_iter_get_full_name (PopplerFontsIter *iter);

Returns the full name of the font associated with iter

Parameters

iter

a PopplerFontsIter

 

Returns

the font full name


poppler_fonts_iter_get_name ()

const char *
poppler_fonts_iter_get_name (PopplerFontsIter *iter);

Returns the name of the font associated with iter

Parameters

iter

a PopplerFontsIter

 

Returns

the font name


poppler_fonts_iter_get_substitute_name ()

const char *
poppler_fonts_iter_get_substitute_name
                               (PopplerFontsIter *iter);

The name of the substitute font of the font associated with iter or NULL if the font is embedded

Parameters

iter

a PopplerFontsIter

 

Returns

the name of the substitute font or NULL if font is embedded

Since: 0.20


poppler_fonts_iter_is_embedded ()

gboolean
poppler_fonts_iter_is_embedded (PopplerFontsIter *iter);

Returns whether the font associated with iter is embedded in the document

Parameters

iter

a PopplerFontsIter

 

Returns

TRUE if font is embedded, FALSE otherwise


poppler_fonts_iter_is_subset ()

gboolean
poppler_fonts_iter_is_subset (PopplerFontsIter *iter);

Returns whether the font associated with iter is a subset of another font

Parameters

iter

a PopplerFontsIter

 

Returns

TRUE if font is a subset, FALSE otherwise


poppler_fonts_iter_next ()

gboolean
poppler_fonts_iter_next (PopplerFontsIter *iter);

Sets iter to point to the next font

Parameters

iter

a PopplerFontsIter

 

Returns

TRUE, if iter was set to the next font


poppler_index_iter_copy ()

PopplerIndexIter *
poppler_index_iter_copy (PopplerIndexIter *iter);

Creates a new PopplerIndexIter as a copy of iter . This must be freed with poppler_index_iter_free().

Parameters

iter

a PopplerIndexIter

 

Returns

a new PopplerIndexIter


poppler_index_iter_free ()

void
poppler_index_iter_free (PopplerIndexIter *iter);

Frees iter .

Parameters

iter

a PopplerIndexIter

 

poppler_index_iter_get_action ()

PopplerAction *
poppler_index_iter_get_action (PopplerIndexIter *iter);

Returns the PopplerAction associated with iter . It must be freed with poppler_action_free().

Parameters

iter

a PopplerIndexIter

 

Returns

a new PopplerAction


poppler_index_iter_get_child ()

PopplerIndexIter *
poppler_index_iter_get_child (PopplerIndexIter *parent);

Returns a newly created child of parent , or NULL if the iter has no child. See poppler_index_iter_new() for more information on this function.

Parameters

parent

a PopplerIndexIter

 

Returns

a new PopplerIndexIter


poppler_index_iter_is_open ()

gboolean
poppler_index_iter_is_open (PopplerIndexIter *iter);

Returns whether this node should be expanded by default to the user. The document can provide a hint as to how the document's index should be expanded initially.

Parameters

iter

a PopplerIndexIter

 

Returns

TRUE, if the document wants iter to be expanded


poppler_index_iter_new ()

PopplerIndexIter *
poppler_index_iter_new (PopplerDocument *document);

Returns the root PopplerIndexIter for document , or NULL. This must be freed with poppler_index_iter_free().

Certain documents have an index associated with them. This index can be used to help the user navigate the document, and is similar to a table of contents. Each node in the index will contain a PopplerAction that can be displayed to the user — typically a POPPLER_ACTION_GOTO_DEST or a POPPLER_ACTION_URI.

Here is a simple example of some code that walks the full index:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
static void
walk_index (PopplerIndexIter *iter)
{
  do
    {
      /* Get the action and do something with it */
      PopplerIndexIter *child = poppler_index_iter_get_child (iter);
      if (child)
        walk_index (child);
      poppler_index_iter_free (child);
    }
  while (poppler_index_iter_next (iter));
}
...
{
  iter = poppler_index_iter_new (document);
  walk_index (iter);
  poppler_index_iter_free (iter);
}

Parameters

document

a PopplerDocument

 

Returns

a new PopplerIndexIter


poppler_index_iter_next ()

gboolean
poppler_index_iter_next (PopplerIndexIter *iter);

Sets iter to point to the next action at the current level, if valid. See poppler_index_iter_new() for more information.

Parameters

iter

a PopplerIndexIter

 

Returns

TRUE, if iter was set to the next action


poppler_layers_iter_copy ()

PopplerLayersIter *
poppler_layers_iter_copy (PopplerLayersIter *iter);

Creates a new PopplerLayersIter as a copy of iter . This must be freed with poppler_layers_iter_free().

Parameters

iter

a PopplerLayersIter

 

Returns

a new PopplerLayersIter

Since 0.12


poppler_layers_iter_free ()

void
poppler_layers_iter_free (PopplerLayersIter *iter);

Frees iter .

Parameters

iter

a PopplerLayersIter

 

Since: 0.12


poppler_layers_iter_get_child ()

PopplerLayersIter *
poppler_layers_iter_get_child (PopplerLayersIter *parent);

Returns a newly created child of parent , or NULL if the iter has no child. See poppler_layers_iter_new() for more information on this function.

Parameters

parent

a PopplerLayersIter

 

Returns

a new PopplerLayersIter, or NULL

Since: 0.12


poppler_layers_iter_get_layer ()

PopplerLayer *
poppler_layers_iter_get_layer (PopplerLayersIter *iter);

Returns the PopplerLayer associated with iter .

Parameters

iter

a PopplerLayersIter

 

Returns

a new PopplerLayer, or NULL if there isn't any layer associated with iter .

[transfer full]

Since: 0.12


poppler_layers_iter_get_title ()

gchar *
poppler_layers_iter_get_title (PopplerLayersIter *iter);

Returns the title associated with iter . It must be freed with g_free().

Parameters

iter

a PopplerLayersIter

 

Returns

a new string containing the iter 's title or NULL if iter doesn't have a title. The returned string should be freed with g_free() when no longer needed.

Since: 0.12


poppler_layers_iter_new ()

PopplerLayersIter *
poppler_layers_iter_new (PopplerDocument *document);

Parameters

document

a PopplerDocument

 

Since: 0.12


poppler_layers_iter_next ()

gboolean
poppler_layers_iter_next (PopplerLayersIter *iter);

Sets iter to point to the next action at the current level, if valid. See poppler_layers_iter_new() for more information.

Parameters

iter

a PopplerLayersIter

 

Returns

TRUE, if iter was set to the next action

Since: 0.12


poppler_ps_file_free ()

void
poppler_ps_file_free (PopplerPSFile *ps_file);

Frees ps_file

Parameters

ps_file

a PopplerPSFile

 

poppler_ps_file_new ()

PopplerPSFile *
poppler_ps_file_new (PopplerDocument *document,
                     const char *filename,
                     int first_page,
                     int n_pages);

Create a new postscript file to render to

Parameters

document

a PopplerDocument

 

filename

the path of the output filename

 

first_page

the first page to print

 

n_pages

the number of pages to print

 

Returns

a PopplerPSFile.

[transfer full]


poppler_ps_file_new_fd ()

PopplerPSFile *
poppler_ps_file_new_fd (PopplerDocument *document,
                        int fd,
                        int first_page,
                        int n_pages);

Create a new postscript file to render to. Note that this function takes ownership of fd ; you must not operate on it again, nor close it.

Parameters

document

a PopplerDocument

 

fd

a valid file descriptor open for writing

 

first_page

the first page to print

 

n_pages

the number of pages to print

 

Returns

a PopplerPSFile.

[transfer full]

Since: 21.12.0


poppler_ps_file_set_duplex ()

void
poppler_ps_file_set_duplex (PopplerPSFile *ps_file,
                            gboolean duplex);

Enable or disable Duplex printing.

Parameters

ps_file

a PopplerPSFile which was not yet printed to

 

duplex

whether to force duplex printing (on printers which support this)

 

poppler_ps_file_set_paper_size ()

void
poppler_ps_file_set_paper_size (PopplerPSFile *ps_file,
                                double width,
                                double height);

Set the output paper size. These values will end up in the DocumentMedia, the BoundingBox DSC comments and other places in the generated PostScript.

Parameters

ps_file

a PopplerPSFile which was not yet printed to.

 

width

the paper width in 1/72 inch

 

height

the paper height in 1/72 inch

 

Types and Values

PopplerDocument

typedef struct _PopplerDocument PopplerDocument;

PopplerFontInfo

typedef struct _PopplerFontInfo PopplerFontInfo;

Interface for getting the Fonts of a poppler_document

Since 24.10 this type supports g_autoptr


enum PopplerFontType

Font types

Members

POPPLER_FONT_TYPE_UNKNOWN

unknown font type

 

POPPLER_FONT_TYPE_TYPE1

Type 1 font type

 

POPPLER_FONT_TYPE_TYPE1C

Type 1 font type embedded in Compact Font Format (CFF) font program

 

POPPLER_FONT_TYPE_TYPE1COT

Type 1 font type embedded in OpenType font program

 

POPPLER_FONT_TYPE_TYPE3

A font type that is defined with PDF graphics operators

 

POPPLER_FONT_TYPE_TRUETYPE

TrueType font type

 

POPPLER_FONT_TYPE_TRUETYPEOT

TrueType font type embedded in OpenType font program

 

POPPLER_FONT_TYPE_CID_TYPE0

CIDFont type based on Type 1 font technology

 

POPPLER_FONT_TYPE_CID_TYPE0C

CIDFont type based on Type 1 font technology embedded in CFF font program

 

POPPLER_FONT_TYPE_CID_TYPE0COT

CIDFont type based on Type 1 font technology embedded in OpenType font program

 

POPPLER_FONT_TYPE_CID_TYPE2

CIDFont type based on TrueType font technology

 

POPPLER_FONT_TYPE_CID_TYPE2OT

CIDFont type based on TrueType font technology embedded in OpenType font program

 

PopplerFontsIter

typedef struct _PopplerFontsIter PopplerFontsIter;

Since 24.10 this type supports g_autoptr


PopplerIndexIter

typedef struct _PopplerIndexIter PopplerIndexIter;

Interface for getting the Index of a poppler_document

Since 24.10 this type supports g_autoptr


PopplerLayersIter

typedef struct _PopplerLayersIter PopplerLayersIter;

Interface for getting the Layers of a poppler_document

Since 24.10 this type supports g_autoptr


enum PopplerPDFConformance

PDF Subtype Conformance

Members

POPPLER_PDF_SUBTYPE_CONF_UNSET

Null

 

POPPLER_PDF_SUBTYPE_CONF_A

Level A (accessible) conformance (PDF/A)

 

POPPLER_PDF_SUBTYPE_CONF_B

Level B (basic) conformance (PDF/A)

 

POPPLER_PDF_SUBTYPE_CONF_G

Level G (external graphical content) (PDF/X)

 

POPPLER_PDF_SUBTYPE_CONF_N

Level N (external ICC Profile) (PDF/X)

 

POPPLER_PDF_SUBTYPE_CONF_P

Level P (ICC Profile) (PDF/X)

 

POPPLER_PDF_SUBTYPE_CONF_PG

Level PG (conjunction of P and G) (PDF/X)

 

POPPLER_PDF_SUBTYPE_CONF_U

Level U (Unicode) conformance (PDF/A)

 

POPPLER_PDF_SUBTYPE_CONF_NONE

No conformance level available

 

Since: 0.70


enum PopplerPDFPart

PDF Subtype Part

Members

POPPLER_PDF_SUBTYPE_PART_UNSET

Null

 

POPPLER_PDF_SUBTYPE_PART_1

1

 

POPPLER_PDF_SUBTYPE_PART_2

2

 

POPPLER_PDF_SUBTYPE_PART_3

3

 

POPPLER_PDF_SUBTYPE_PART_4

4

 

POPPLER_PDF_SUBTYPE_PART_5

5

 

POPPLER_PDF_SUBTYPE_PART_6

6

 

POPPLER_PDF_SUBTYPE_PART_7

7

 

POPPLER_PDF_SUBTYPE_PART_8

8

 

POPPLER_PDF_SUBTYPE_PART_NONE

No part available

 

Since: 0.70


enum PopplerPDFSubtype

PDF Subtype

Members

POPPLER_PDF_SUBTYPE_UNSET

Null

 

POPPLER_PDF_SUBTYPE_PDF_A

ISO 19005 - Document management -- Electronic document file format for long-term preservation (PDF/A)

 

POPPLER_PDF_SUBTYPE_PDF_E

ISO 24517 - Document management -- Engineering document format using PDF (PDF/E)

 

POPPLER_PDF_SUBTYPE_PDF_UA

ISO 14289 - Document management applications -- Electronic document file format enhancement for accessibility (PDF/UA)

 

POPPLER_PDF_SUBTYPE_PDF_VT

ISO 16612 - Graphic technology -- Variable data exchange (PDF/VT)

 

POPPLER_PDF_SUBTYPE_PDF_X

ISO 15930 - Graphic technology -- Prepress digital data exchange (PDF/X)

 

POPPLER_PDF_SUBTYPE_NONE

Not compliant with the above standards

 

Since: 0.70


PopplerPSFile

typedef struct _PopplerPSFile PopplerPSFile;

enum PopplerPageLayout

Page layout types

Members

POPPLER_PAGE_LAYOUT_UNSET

no specific layout set

 

POPPLER_PAGE_LAYOUT_SINGLE_PAGE

one page at a time

 

POPPLER_PAGE_LAYOUT_ONE_COLUMN

pages in one column

 

POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT

pages in two columns with odd numbered pages on the left

 

POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT

pages in two columns with odd numbered pages on the right

 

POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT

two pages at a time with odd numbered pages on the left

 

POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT

two pages at a time with odd numbered pages on the right

 

enum PopplerPageMode

Page modes

Members

POPPLER_PAGE_MODE_UNSET

no specific mode set

 

POPPLER_PAGE_MODE_NONE

neither document outline nor thumbnails visible

 

POPPLER_PAGE_MODE_USE_OUTLINES

document outline visible

 

POPPLER_PAGE_MODE_USE_THUMBS

thumbnails visible

 

POPPLER_PAGE_MODE_FULL_SCREEN

full-screen mode

 

POPPLER_PAGE_MODE_USE_OC

layers panel visible

 

POPPLER_PAGE_MODE_USE_ATTACHMENTS

attachments panel visible

 

PopplerPageRange

typedef struct {
    gint start_page;
    gint end_page;
} PopplerPageRange;

A PopplerPageRange is used to specify a range of pages.

Members

gint start_page;

first page in the range of pages

 

gint end_page;

last page in the range of pages

 

Since: 0.80


enum PopplerPermissions

Permissions

Members

POPPLER_PERMISSIONS_OK_TO_PRINT

document can be printer

 

POPPLER_PERMISSIONS_OK_TO_MODIFY

document contents can be modified

 

POPPLER_PERMISSIONS_OK_TO_COPY

document can be copied

 

POPPLER_PERMISSIONS_OK_TO_ADD_NOTES

annotations can added to the document

 

POPPLER_PERMISSIONS_OK_TO_FILL_FORM

interactive form fields can be filled in

 

POPPLER_PERMISSIONS_OK_TO_EXTRACT_CONTENTS

extract text and graphics (in support of accessibility to users with disabilities or for other purposes). Since 0.18

 

POPPLER_PERMISSIONS_OK_TO_ASSEMBLE

assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images). Since 0.18

 

POPPLER_PERMISSIONS_OK_TO_PRINT_HIGH_RESOLUTION

document can be printer at high resolution. Since 0.18

 

POPPLER_PERMISSIONS_FULL

document permits all operations

 

enum PopplerPrintDuplex

Duplex viewer preference

Members

POPPLER_PRINT_DUPLEX_NONE

No preference on duplex printing

 

POPPLER_PRINT_DUPLEX_SIMPLEX

Print single-sided

 

POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE

Duplex and flip on the short edge of the sheet

 

POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE

Duplex and flip on the long edge of the sheet

 

Since: 0.80


enum PopplerPrintScaling

PrintScaling viewer preference

Members

POPPLER_PRINT_SCALING_APP_DEFAULT

application's default page scaling

 

POPPLER_PRINT_SCALING_NONE

no page scaling

 

Since: 0.73


enum PopplerViewerPreferences

Viewer preferences

Members

POPPLER_VIEWER_PREFERENCES_UNSET

no preferences set

 

POPPLER_VIEWER_PREFERENCES_HIDE_TOOLBAR

hider toolbars when document is active

 

POPPLER_VIEWER_PREFERENCES_HIDE_MENUBAR

hide menu bar when document is active

 

POPPLER_VIEWER_PREFERENCES_HIDE_WINDOWUI

hide UI elements in document's window

 

POPPLER_VIEWER_PREFERENCES_FIT_WINDOW

resize document's window to fit the size of the first displayed page

 

POPPLER_VIEWER_PREFERENCES_CENTER_WINDOW

position the document's window in the center of the screen

 

POPPLER_VIEWER_PREFERENCES_DISPLAY_DOC_TITLE

display document title in window's title bar

 

POPPLER_VIEWER_PREFERENCES_DIRECTION_RTL

the predominant reading order for text is right to left

 

Property Details

The “author” property

  “author”                   char *

The author of the document

Owner: PopplerDocument

Flags: Read / Write

Default value: NULL


The “creation-date” property

  “creation-date”            int

The date the document was created as seconds since the Epoch, or -1

PopplerDocument:creation-date has been deprecated since version 20.09.0 and should not be used in newly-written code.

This will overflow in 2038. Use creation-datetime instead.

Owner: PopplerDocument

Flags: Read / Write

Allowed values: >= -1

Default value: -1


The “creation-datetime” property

  “creation-datetime”        GDateTime *

The date and time the document was created.

Owner: PopplerDocument

Flags: Read / Write

Since: 20.09.0


The “creator” property

  “creator”                  char *

The creator of the document. See also poppler_document_get_creator()

Owner: PopplerDocument

Flags: Read / Write

Default value: NULL


The “format” property

  “format”                   char *

The PDF version as string. See also poppler_document_get_pdf_version_string()

Owner: PopplerDocument

Flags: Read

Default value: NULL


The “format-major” property

  “format-major”             guint

The PDF major version number. See also poppler_document_get_pdf_version()

Owner: PopplerDocument

Flags: Read

Default value: 1


The “format-minor” property

  “format-minor”             guint

The PDF minor version number. See also poppler_document_get_pdf_version()

Owner: PopplerDocument

Flags: Read

Default value: 0


The “keywords” property

  “keywords”                 char *

The keywords associated to the document

Owner: PopplerDocument

Flags: Read / Write

Default value: NULL


The “linearized” property

  “linearized”               gboolean

Whether document is linearized. See also poppler_document_is_linearized()

Owner: PopplerDocument

Flags: Read

Default value: FALSE


The “metadata” property

  “metadata”                 char *

Document metadata in XML format, or NULL

Owner: PopplerDocument

Flags: Read

Default value: NULL


The “mod-date” property

  “mod-date”                 int

The date the document was most recently modified as seconds since the Epoch, or -1

PopplerDocument:mod-date has been deprecated since version 20.09.0 and should not be used in newly-written code.

This will overflow in 2038. Use mod-datetime instead.

Owner: PopplerDocument

Flags: Read / Write

Allowed values: >= -1

Default value: -1


The “mod-datetime” property

  “mod-datetime”             GDateTime *

The GDateTime the document was most recently modified.

Owner: PopplerDocument

Flags: Read / Write

Since: 20.09.0


The “page-layout” property

  “page-layout”              PopplerPageLayout

The page layout that should be used when the document is opened

Owner: PopplerDocument

Flags: Read

Default value: POPPLER_PAGE_LAYOUT_UNSET


The “page-mode” property

  “page-mode”                PopplerPageMode

The mode that should be used when the document is opened

Owner: PopplerDocument

Flags: Read

Default value: POPPLER_PAGE_MODE_UNSET


The “permissions” property

  “permissions”              PopplerPermissions

Flags specifying which operations are permitted when the document is opened

Owner: PopplerDocument

Flags: Read

Default value: POPPLER_PERMISSIONS_OK_TO_PRINT | POPPLER_PERMISSIONS_OK_TO_MODIFY | POPPLER_PERMISSIONS_OK_TO_COPY | POPPLER_PERMISSIONS_OK_TO_ADD_NOTES | POPPLER_PERMISSIONS_OK_TO_FILL_FORM | POPPLER_PERMISSIONS_OK_TO_EXTRACT_CONTENTS | POPPLER_PERMISSIONS_OK_TO_ASSEMBLE | POPPLER_PERMISSIONS_OK_TO_PRINT_HIGH_RESOLUTION


The “print-duplex” property

  “print-duplex”             PopplerPrintDuplex

Duplex Viewer Preference.

Owner: PopplerDocument

Flags: Read

Default value: POPPLER_PRINT_DUPLEX_NONE

Since: 0.80


The “print-n-copies” property

  “print-n-copies”           int

Suggested number of copies to be printed for this document

Owner: PopplerDocument

Flags: Read

Allowed values: >= 1

Default value: 1

Since: 0.80


The “print-scaling” property

  “print-scaling”            PopplerPrintScaling

Print Scaling Viewer Preference.

Owner: PopplerDocument

Flags: Read

Default value: POPPLER_PRINT_SCALING_APP_DEFAULT

Since: 0.73


The “producer” property

  “producer”                 char *

The producer of the document. See also poppler_document_get_producer()

Owner: PopplerDocument

Flags: Read / Write

Default value: NULL


The “subject” property

  “subject”                  char *

The subject of the document

Owner: PopplerDocument

Flags: Read / Write

Default value: NULL


The “subtype” property

  “subtype”                  PopplerPDFSubtype

Document PDF subtype type

Owner: PopplerDocument

Flags: Read

Default value: POPPLER_PDF_SUBTYPE_UNSET


The “subtype-conformance” property

  “subtype-conformance”      PopplerPDFConformance

Document PDF subtype conformance

Owner: PopplerDocument

Flags: Read

Default value: POPPLER_PDF_SUBTYPE_CONF_UNSET


The “subtype-part” property

  “subtype-part”             PopplerPDFPart

Document PDF subtype part

Owner: PopplerDocument

Flags: Read

Default value: POPPLER_PDF_SUBTYPE_PART_UNSET


The “subtype-string” property

  “subtype-string”           char *

Document PDF subtype. See also poppler_document_get_pdf_subtype_string()

Owner: PopplerDocument

Flags: Read

Default value: NULL


The “title” property

  “title”                    char *

The document's title or NULL

Owner: PopplerDocument

Flags: Read / Write

Default value: NULL


The “viewer-preferences” property

  “viewer-preferences”       PopplerViewerPreferences

Viewer Preferences.

Owner: PopplerDocument

Flags: Read