PdfFileInfo

Overview

PdfFileInfo is a class in Aspose.PDF FOSS for Python. Inherits from: _BoundFacade.

The document information dictionary, and the geometry of its pages.

This class declares 7 methods for PdfFileInfo objects in Python programs. Available methods include: clear_meta_info, get_meta_info, get_page_box, get_page_height, get_page_rotation, get_page_width, set_meta_info. Public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package. Properties: is_encrypted, meta_info, number_of_pages, pdf_version.

Properties

NameTypeAccessDescription
meta_infodict[str, str]ReadEvery /Info entry, as a plain dictionary.
number_of_pagesintReadHow many pages the document has.
is_encryptedboolReadWhether the document is still locked – see Document.is_encrypted.
pdf_versionstrReadThe version in the file’s header, e.g.

Methods

SignatureDescription
get_meta_info(name: str, default: str | None) → str | NoneOne /Info entry by its own key, or default.
set_meta_info(name: str, value: str | None)Set one /Info entry; None removes it.
clear_meta_info()Remove every /Info entry.
get_page_width(page_number: int) → floatThe width of a page in points, from its media box.
get_page_height(page_number: int) → floatThe height of a page in points, from its media box.
get_page_rotation(page_number: int) → intA page’s clockwise rotation in degrees.
get_page_box(page_number: int, boundary: str)One of a page’s five boxes, as (x0, y0, x1, y1).

See Also