Document
Object Hierarchy:
Description:
Namespace: Poppler
Package: poppler-glib
Content:
Properties:
- public string author { owned get; set; }
The author of the document
- public int creation_date { get; set; }
The date the document was created as seconds since the Epoch, or -1
- public DateTime creation_datetime { owned get; set; }
The DateTime the document was created.
- public string creator { owned get; set; }
The creator of the document.
- public string format { owned get; }
The PDF version as string.
- public uint format_major { get; }
The PDF major version number.
- public uint format_minor { get; }
The PDF minor version number.
- public string keywords { owned get; set; }
The keywords associated to the document
- public bool linearized { get; }
Whether document is linearized.
- public string metadata { owned get; }
Document metadata in XML format, or
null
- public int mod_date { get; set; }
The date the document was most recently modified as seconds since the Epoch, or -1
- public DateTime mod_datetime { owned get; set; }
The DateTime the document was most recently modified.
- public PageLayout page_layout { get; }
The page layout that should be used when the document is opened
- public PageMode page_mode { get; }
The mode that should be used when the document is opened
- public Permissions permissions { get; }
Flags specifying which operations are permitted when the document is opened
- public PrintDuplex print_duplex { get; }
- public int print_n_copies { get; }
Suggested number of copies to be printed for this document
- public PrintScaling print_scaling { get; }
- public string producer { owned get; set; }
The producer of the document.
- public string subject { owned get; set; }
The subject of the document
- public PDFSubtype subtype { get; }
Document PDF subtype type
- public PDFConformance subtype_conformance { get; }
Document PDF subtype conformance
- public PDFPart subtype_part { get; }
Document PDF subtype part
- public string subtype_string { owned get; }
Document PDF subtype.
- public string title { owned get; set; }
The document's title or
null
- public ViewerPreferences viewer_preferences { get; }
Creation methods:
- protected Document ()
- public Document.from_bytes (Bytes bytes, string? password) throws Error
Creates a new Document from
bytes
. - public Document.from_data (uint8[] data, string? password) throws Error
Creates a new Document.
- public Document.from_fd (int fd, string? password) throws Error
Creates a new Document reading the PDF contents from the file descriptor
fd
. - public Document.from_file (string uri, string? password) throws Error
Creates a new Document.
- public Document.from_gfile (File file, string? password, Cancellable? cancellable = null) throws Error
Creates a new Document reading the PDF contents from
file
. - public Document.from_stream (InputStream stream, int64 length, string? password, Cancellable? cancellable = null) throws Error
Creates a new Document reading the PDF contents from
stream
.
Methods:
- public Tree? create_dests_tree ()
Creates a balanced binary tree of all named destinations in this
- public Dest find_dest (string link_name)
Creates a Dest for the named destination
link_name
in this. - public List<Attachment> get_attachments ()
Returns a List containing Attachments.
- public string get_author ()
Returns the author of the document
- public time_t get_creation_date ()
Returns the date the document was created as seconds since the Epoch
- public DateTime? get_creation_date_time ()
Returns the date the document was created as a DateTime
- public string get_creator ()
Returns the creator of the document.
- public FormField get_form_field (int id)
Returns the FormField for the given
id
. - public bool get_id (out string permanent_id, out string update_id)
Returns the PDF file identifier represented as two byte string arrays of size 32.
- public string get_keywords ()
Returns the keywords associated to the document
- public string get_metadata ()
Returns the XML metadata string of the document
- public time_t get_modification_date ()
Returns the date the document was most recently modified as seconds since the Epoch
- public DateTime? get_modification_date_time ()
Returns the date the document was most recently modified as a DateTime
- public uint get_n_attachments ()
Returns the number of attachments in a loaded document.
- public int get_n_pages ()
Returns the number of pages in a loaded document.
- public int get_n_signatures ()
Returns how many digital signatures this contains.
- public Page get_page (int index)
Returns the Page indexed at
index
. - public Page get_page_by_label (string label)
Returns the Page reference by
label
. - public PageLayout get_page_layout ()
Returns the page layout that should be used when the document is opened
- public PageMode get_page_mode ()
Returns a PageMode representing how the document should be initially displayed when opened.
- public PDFConformance get_pdf_conformance ()
Returns the conformance level of the this as PDFConformance.
- public PDFPart get_pdf_part ()
Returns the part of the conforming standard that the this adheres to as a PDFSubtype.
- public PDFSubtype get_pdf_subtype ()
Returns the subtype of this as a PDFSubtype.
- public string? get_pdf_subtype_string ()
Returns the PDF subtype version of this as a string.
- public void get_pdf_version (out uint major_version, out uint minor_version)
Updates values referenced by
major_version
&minor_version
with the major and minor PDF versions of this. - public string get_pdf_version_string ()
Returns the PDF version of this as a string (e.g. PDF-1.6)
- public Permissions get_permissions ()
Returns the flags specifying which operations are permitted when the document is opened.
- public PrintDuplex get_print_duplex ()
Returns the duplex mode value suggested for printing by author of the document.
- public int get_print_n_copies ()
Returns the suggested number of copies to be printed.
- public PageRange[] get_print_page_ranges ()
Returns the suggested page ranges to print in the form of array of PageRanges and number of ranges.
- public PrintScaling get_print_scaling ()
Returns the print scaling value suggested by author of the document.
- public string get_producer ()
Returns the producer of the document.
- public List<FormField> get_signature_fields ()
- public string get_subject ()
Returns the subject of the document
- public string get_title ()
Returns the document's title
- public bool has_attachments ()
Returns
true
of this has any attachments. - public bool has_javascript ()
Returns whether this has any javascript in it.
- public bool is_linearized ()
Returns whether this is linearized or not.
- public void reset_form (List<string>? fields, bool exclude_fields)
Resets the form fields specified by fields if exclude_fields is FALSE.
- public bool save (string uri) throws Error
Saves this.
- public bool save_a_copy (string uri) throws Error
Saves a copy of the original this.
- public bool save_to_fd (int fd, bool include_changes) throws Error
Saves this.
- public void set_author (string author)
Sets the document's author.
- public void set_creation_date (time_t creation_date)
Sets the document's creation date.
- public void set_creation_date_time (DateTime? creation_datetime)
Sets the document's creation date.
- public void set_creator (string creator)
Sets the document's creator.
- public void set_keywords (string keywords)
Sets the document's keywords.
- public void set_modification_date (time_t modification_date)
Sets the document's modification date.
- public void set_modification_date_time (DateTime? modification_datetime)
Sets the document's modification date.
- public void set_producer (string producer)
Sets the document's producer.
- public void set_subject (string subject)
Sets the document's subject.
- public void set_title (string title)
Sets the document's title.
Inherited Members:
All known members inherited from class GLib.Object