PdfFileInfo

PdfFileInfo class

Represents a class for accessing meta information of PDF document.

The PdfFileInfo type exposes the following members:

Constructors

NameDescription
PdfFileInfo()Initializes a new instance of the Aspose.Pdf.Facades.PdfFileInfo class with default values.
PdfFileInfo(input_stream)Initializes a new instance of the PdfFileInfo class
PdfFileInfo(input_stream, password)Initializes a new instance of the PdfFileInfo class
PdfFileInfo(input_file)Initializes a new instance of the PdfFileInfo class
PdfFileInfo(input_file, password)Initializes a new instance of the PdfFileInfo class
PdfFileInfo(document)Initializes a new instance of the PdfFileInfo class

Properties

NameDescription
documentGets the document facade is working on.
authorGets or sets the Author information of PDF document.
is_encryptedCheckes whether the PDF document is encrypted.
is_pdf_fileCheckes whether the source input is a valid PDF file.
use_strict_validationUses strict validation rules via using is_pdf_file property.
creation_dateGets or sets the CreationDate information of PDF document.
creatorGets or sets the Creator information of PDF document.
has_collectionReturns true if the current input file is a ‘Portfolio’ file containing collection of PDF files in it.
input_fileGets or sets the input file.
input_streamGets or sets the input stream.
keywordsGets or sets the Keywords information of PDF document.
mod_dateGets or sets the ModDate date information of PDF document.
number_of_pagesGets the number of document pages.
producerGets the Producer information of PDF document.
subjectGets or sets the Subject information of PDF document.
titleGets or sets the Title information of PDF document.
password_typeReturns the type of password which was passed for creating PdfFileInfo instance. See possible values in password_type.
Pay attention that pdf document can be opened using both user (or open) password and owner (or permissions, edit) password.
has_open_passwordReturns true if password is needed to open password protected pdf document.
has_edit_passwordReturns true if password is needed to modify permissions or document security property.
Pay attention that this property can be read only if valid password was provided in PdfFileInfo constructor.
In case PasswordType is Inaccessible (means that invalid password was provided) reading this property will fail with InvalidPasswordException.

Methods

NameDescription
bind_pdf(src_doc)Initializes the facade.
bind_pdf(src_file)Initializes the facade.
bind_pdf(src_stream)Initializes the facade.
save(dest_stream)Save updated PDF document into specified stream.
save(dest_file)Save updated PDF document into specified file.
save_new_info(output_stream)Save updated PDF document into specified stream.
save_new_info(output_file)Save updated PDF document into specified file.
close()Deinitializes the instance.
clear_info()Clears all meta information of PDF document.
get_document_privilege()Gets the PDF document privilege settings.
get_meta_info(name)Gets customized information of PDF document with property name. If there is no property match the name it will return a blank string.
get_page_height(page_num)Gets the height of the specified page.
get_page_rotation(page_num)Gets the rotation of the specified page.
get_page_width(page_num)Gets the width of the specified page.
get_page_x_offset(page_num)Gets the horizontal offset of the specified page display area.
get_page_y_offset(page_num)Gets the vertical offset of the specified page display area.
get_pdf_version()Gets the version info of PDF document.
set_meta_info(name, value)Sets customized information of PDF document.
save_new_info_with_xmp(output_file_name)Changes the properties specified explicitly by setting file information, other properties remain.

See Also