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
| Name | Type | Access | Description |
|---|---|---|---|
meta_info | dict[str, str] | Read | Every /Info entry, as a plain dictionary. |
number_of_pages | int | Read | How many pages the document has. |
is_encrypted | bool | Read | Whether the document is still locked – see Document.is_encrypted. |
pdf_version | str | Read | The version in the file’s header, e.g. |
Methods
| Signature | Description |
|---|---|
get_meta_info(name: str, default: str | None) → str | None | One /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) → float | The width of a page in points, from its media box. |
get_page_height(page_number: int) → float | The height of a page in points, from its media box. |
get_page_rotation(page_number: int) → int | A 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). |