Aspose.PDF FOSS for Python
API reference for Aspose.Pdf FOSS for Python. 265 public types organized by module.
Core API
| Class | Description |
|---|---|
Action | Base class for an interactive action. |
AsposePdfException | Base class for all aspose_pdf exceptions. |
ByteArrayDataSource | A data source backed by in-memory bytes. |
CdrLoadOptions | Options for loading CDR files. |
CgmLoadOptions | Options for loading CGM files. |
ColorPrimitive | Very small color primitive with transparency support. |
DataSource | Base class for plugin inputs and outputs. |
DeprecatedFeatureException | Raised when a deprecated PDF feature is used that is not allowed in newer PDF versions. |
Destination | Base class for a view destination on a document page. |
Document-document | Pythonic wrapper for PDF document lifecycle and core operations. |
Field | A field of an interactive form. |
FileDataSource | A data source backed by a file on disk. |
FileFontSource | Discover the font(s) contained in a single file. |
FileSpecification | A document-level embedded file (/Filespec) with typed metadata. |
FillMode | Fill mode enumeration for path operations. |
FitBDestination | Fit the page’s bounding box in the window. |
FitBHDestination | Fit the bounding-box width with top at the top of the window. |
FitBVDestination | Fit the bounding-box height with left at the left of the window. |
FitDestination | Fit the whole page in the window. |
FitHDestination | Fit the page width with top at the top of the window. |
FitRDestination | Fit the rectangle (left, bottom, right, top) in the window. |
FitVDestination | Fit the page height with left at the left of the window. |
FolderFontSource | Collect fonts from a directory (optionally recursing into subfolders). |
FontDescriptor | Represents a discoverable font. |
FontEmbeddingException | Raised when there is an error embedding fonts in the PDF. |
FontRegistry | Singleton registry for resolving well-known font names. |
FontRepository | Aggregate font sources and resolve fonts by name. |
FontSource | Base class for external font providers. |
FontSubstitutionOptions | Font sources the renderer may substitute from. |
Form | Represents an interactive form (AcroForm) within a PDF document. |
GoToAction | Jump to a destination within this document. |
GoToRAction | Jump to a destination in another (remote) PDF file. |
GradientAxialShading | Represents axial (linear) gradient shading. |
GraphicElement | A painted path or a placed image, read from a page’s content stream. |
GraphicElementCollection | An in-memory list of :class:GraphicElement objects. |
GraphicsAbsorber | Absorbs graphic elements from PDF pages. |
HtmlLoadOptions | Options for loading HTML documents. |
HtmlSaveOptions | Options for saving PDF documents as HTML. |
ImagePlacement-images | Represent an image placed on a PDF page. |
ImagePlacementAbsorber-images | Absorber to collect image placements from PDF pages. |
IncorrectCMapUsageException | Raised when there is an incorrect usage of CMap. |
InvalidFormTypeOperationException | Exception thrown when an invalid form type operation is attempted. |
InvalidOperationException | Raised when a graphics element is attached to the wrong parent. |
InvalidPasswordException | Raised when an incorrect password is provided for an encrypted document. |
InvalidPdfFileFormatException | Raised when the PDF file format is invalid or corrupted. |
InvalidValueFormatException | Raised when an invalid value is encountered during parsing or conversion. |
JavaScriptAction | Run a JavaScript script (serialized verbatim, not validated). |
LatexFragment | Small value object that stores LaTeX source text. |
LaunchAction | Launch an application or open a file (serialized verbatim). |
Layer | One optional content group, and whether it is currently shown. |
LayerCollection | The document’s layers, indexable by position or by name. |
License | License management class for Aspose.PDF. |
Margin | Margin provides a simple container for page margin values (top, left, bottom, right) that can be passed to layout‑related APIs. |
MarkdownSaveOptions | MarkdownSaveOptions lets developers configure Markdown export, including the target resources_directory_name, markdown_format, whether to extract_images, and the image_directory; the settings can be serialized with to_dict. |
Matrix3D | Represents a 3D transformation matrix. |
MemoryFontSource | Expose a font program supplied as in-memory bytes. |
MergeOptions | Options for :class:Merger: concatenate all inputs in order. |
Merger | Concatenate every input PDF into a single document. |
NamedAction | A predefined named action, e.g. |
NamespaceProvider | Resolve XMP namespace prefixes and URIs. |
OfdLoadOptions | Options for loading OFD files. |
OperationResult | A single result produced by a plugin. |
OptimizationOptions | OptimizationOptions.to_dict serializes all optimization flags into a dictionary for inspection or JSON output. |
OptimizeOptions | Options for :class:Optimizer. |
Optimizer | Optimize each input PDF (compression + unused-object cleanup). |
OutlineCollection | Top-level collection of :class:OutlineItem bookmarks. |
OutlineItem | A single bookmark entry in a PDF outline tree. |
Page | A page of a PDF document. |
PageCollection | A collection to manage PDF pages within a Document. |
PageInfo | Class with 1 property. |
PdfAConversionResult | Result of a PDF/A conversion operation. |
PdfAValidateOptions-pdfa | Container for PDF/A validation settings. |
PdfAValidationResult-pdfa | Detailed result of a PDF/A validation run. |
PdfAValidator | Plugin that runs PDF/A validation on one or more inputs. |
PdfConsts | Class with 2 methods. |
PdfException | Base class for PDF-related exceptions. |
PdfExtractor | Simple PDF text and image extractor. |
PdfFileEditor | Facade for PDF file editing operations. |
PdfIOException | Raised when there is an I/O error during PDF processing. |
PdfLoadLimits | Immutable safety limits for untrusted PDF input and authored assets. |
PdfParseException | Raised when there is an error parsing a PDF document. |
PdfPlugin | Base class for low-code plugins. |
PdfResourceLimitException | Raised when processing a PDF would exceed a configured resource limit. |
PdfSecurityException | Raised when there is an encryption, signature, or permissions error. |
PdfSignature | Represent a PDF digital signature. |
PdfUaValidateOptions | Container for batch PDF/UA validation settings. |
PdfUaValidationResult | Detailed result of a PDF/UA structure check (heuristic). |
PdfUaValidator | Plugin that runs heuristic PDF/UA validation on one or more inputs. |
PdfValidationException | Raised when a PDF document fails validation or compliance checks. |
PerformanceLogger | PerformanceLogger.log_line(line) records a diagnostic line to the logger’s log property for custom performance tracing. |
PluginOptions | Hold input/output data sources and their PDF resource-limit policy. |
Point | Represents a point in 2D space. |
Point3D | Represents a 3D point. |
PrinterSettings | Class with 11 properties. |
Recipient | One certificate that may open the document, and what it may then do. |
Rectangle | Rectangle representing image placement bounds on a PDF page. |
RegexResult | Wraps a single regular-expression match found on a PDF page. |
ResetFormAction | Reset the form’s fields to their default values. |
ResultContainer | Holds the ordered results of a plugin operation. |
SplitOptions | Options for :class:Splitter: split the first input into single pages. |
Splitter | Split the first input PDF into one document per page. |
StatisticsEntry | Entry for tracking statistics and timing information. |
StreamDataSource | A data source backed by a binary stream (e.g. |
StructureElement | A mutable logical-structure element in a tagged PDF. |
SubmitFormAction | Send the form’s field values to url. |
SvgLoadOptions-load_options | Options for loading SVG files. |
SvgLoadOptions-svg | Class with 1 method and 2 properties. |
SystemFontSource | Collect fonts from common system font directories. |
TaggedContent | Editable view of a document’s logical structure tree. |
TaggedContext | Class with 4 properties. |
TextAbsorber | Absorbs text from PDF pages (legacy class, alias for TextFragmentAbsorber). |
TextExtractionOptions | Options for text extraction from PDF pages. |
TextExtractor | Extract plain text from each input PDF. |
TextExtractorOptions | Options for :class:TextExtractor: extract text from each input. |
TextFormattingMode | Text formatting mode for text extraction. |
TextFragment | A text fragment found inside a PDF page. |
TextFragmentAbsorber-text | Absorbs text fragments from a PDF page or document. |
TextFragmentCollection | A mutable ordered collection of :class:TextFragment objects. |
TextLayoutOptions | Configure complex-text shaping and line layout for Page.add_text. |
TextSearchOptions | Options controlling how text search is performed. |
URIAction | Resolve a uniform resource identifier (typically a web link). |
UnsignedContent-forms | Represents a collection of unsigned content elements in a PDF document. |
UnsignedContentAbsorber-forms | Extract unsigned form fields and annotations from a PDF document. |
UnsupportedFeatureException | Raised when a compatibility surface names a feature this package lacks. |
ValidationOptions | Configuration for signature validation. |
ValidationResult | Structured result returned by signature validation. |
VirtualizationPerformance | Class with 5 methods. |
WarichuWPElement | Minimal tagged-element type for API compatibility. |
XYZDestination | Position (left, top) at the upper-left with an optional zoom. |
Enumerations
| Enumeration | Description |
|---|---|
CertificationLevel | DocMDP certification level of a signature. |
DocFormat | Target format for a save operation. |
Duplex | Enum with 4 members. |
FieldType | Type of form field. |
FormType | Type of PDF form. |
PadesLevel | PAdES baseline conformance level reached by a signature. |
Plugin | Identifiers for the available low-code plugins. |
PrintRange | Enum with 4 members. |
RevocationStatus | Certificate revocation outcome (OCSP/CRL). |
SaveFormat | Format for saving PDF documents. |
StructureTypeStandard | Enum with 15 members. |
TrustStatus | Outcome of building/validating the signer’s certificate chain. |
ValidationMethod | Selects the signature format / validation algorithm. |
ValidationMode | Controls whether certificate revocation is checked via network. |
ValidationStatus | Outcome of a :class:ValidationResult. |
Annotations
| Class | Description |
|---|---|
Annotation | Live view over a single annotation on a page. |
AnnotationCollection | Mutable sequence-like wrapper over page annotations. |
LinkAnnotation | Concrete annotation type kept for compatibility with tests/API. |
MarkupAnnotation | Base class for markup annotations. |
PDF3DAnnotation | Minimal annotation wrapper for prerelease imports. |
PDF3DArtwork | Container for 3D content and named views. |
PDF3DContent | Reference to 3D content stored on disk. |
PDF3DView | Lightweight description of a saved 3D view. |
Enumerations
| Enumeration | Description |
|---|---|
AnnotationFlags | Flags that define annotation behaviour. |
AnnotationType | Known annotation subtype names (PDF 32000-1:2008, Table 169). |
PDF3DLightingScheme | Enum with 5 members. |
PDF3DRenderMode | PDF3DRenderMode and PDF3DLightingScheme enums let developers choose rendering style (SOLID, WIREFRAME, TRANSPARENT) and lighting (HEADLAMP, WHITE, etc.) for 3D annotations. |
Clustering
| Class | Description |
|---|---|
Cluster | Represents a cluster of data points. |
ClusterCollection | A collection of clusters. |
DataPoint | Represents a data point in clustering operations. |
Engine
| Class | Description |
|---|---|
AbsorbedElement | One painted path or placed image, in page (user) space. |
AnnotationName | A str subclass that marks a value to be serialized as a PDF name. |
AuthoredFont | A normalized embedded font and the mutable CID mapping for authored text. |
AuthoredImage | Prepared image data and PDF image XObject metadata. |
BitStream | Minimal bit-oriented buffer used by compatibility code. |
Block | One piece of exported structure. |
CffOutlines | Decode glyph outlines from a CFF (Type 2 charstring) font program. |
ChainResult | Result of building and validating a certificate path. |
CharacterCollection | A CIDSystemInfo registry, ordering, and supplement triple. |
CidTextCodec | Code codec for a composite (Type0) font’s show strings. |
Codestream | Class with 2 methods and 8 properties. |
Color | Represents a color in PDF documents. |
CompositeFontMetric | Advance metrics for a composite (Type0) font. |
ContentStreamParser | Parse a PDF content stream and extract plain text. |
CosExtractor | Extract pages, streams, images and metadata from a PdfDocument. |
DecodedImage | A decoded JPEG 2000 image as interleaved 8-bit samples. |
DecodedJpeg | A decoded JPEG image. |
Decoder-ccitt | Class with 2 methods. |
Decoder-jbig2 | JBIG2 decoder that parses segment structure and extracts bitmap data. |
Decoder-jpx | JPEG 2000 (JPX) Stream Decoder. |
DssMaterial | Validation material destined for (or harvested from) a /DSS. |
Encoding | Class with 1 method and 4 members. |
EncryptionUtils | Utility class for PDF-compliant AES-CBC, RC4 encryption, and key derivation. |
FontResolver | Index external font sources and resolve PDF font names against them. |
GeneratedAppearance | A synthesised appearance: content bytes plus any required ExtGState entries. |
GlyphPlacement | One shaped glyph at an em-relative position within a laid-out line. |
ImagePlacement-simple_pdf | Represents an image placement on a page. |
ImagePlacementAbsorber-simple_pdf | Absorber that finds image placements in a PDF. |
IncrementalUpdate | Generate an incremental update section for an existing PDF. |
IncrementalWriter | Utility that appends incremental updates to an existing PDF. |
Jpeg2000Error | A JPEG 2000 codestream that cannot be decoded. |
LayoutElement | A positioned piece of page content (a text object or an image paint). |
LayoutLine | One visual line with logical replacement text and shaped glyphs. |
LayoutResult | Complete line layout; glyph coordinates and widths are in em units. |
LazyImageDict | Dictionary that decodes image streams on demand to save memory. |
LazyPdfObjectStore | Object-number → COS object map that parses from a :class:PdfCosParser on demand. |
MQDecoder | The MQ arithmetic decoder of Annex C. |
Matrix | Matrix.translate(x, y) shifts a coordinate system, while Matrix.multiply(other) composes two transformations, exposing the underlying a‑f components. |
OptionalContent | The document’s optional content groups and their default visibility. |
OptionalContentGroup | One optional content group (/OCG) of the document. |
ParseWarnings | Collects warnings during parsing. |
PdfArray | PdfArray provides an items collection and an append method to build PDF array objects. |
PdfBoolean | PdfBoolean represents a PDF boolean value via its ‘value’ property. |
PdfCorruptedError | Unrecoverable PDF corruption. |
PdfCosParser | Parse a PDF file (bytes) into a :class:PdfDocument. |
PdfCosWriter | Serialize a :class:PdfDocument to a PDF byte sequence. |
PdfDictionary | PdfDictionary behaves like a mapping with get and pop methods to access entries. |
PdfDocument | Container for a PDF’s COS object graph. |
PdfEncodingError | Font or content stream encoding error. |
PdfIndirectReference | PdfIndirectReference exposes the object number and generation number of an indirect PDF object. |
PdfMalformedError | Recoverable malformed PDF structure. |
PdfName | Class with 1 method and 1 property. |
PdfNull | Represent PDF null object. |
PdfNumber | Class with 1 method and 1 property. |
PdfObject | Base class for all PDF COS objects. |
PdfObjectID | PdfObjectID exposes the object_number and generation_number of an indirect PDF object, enabling precise identification within the cross‑reference table. |
PdfObjectRegistry | PdfObjectRegistry lets you register any PdfObject and retrieve it later by its PdfObjectID via the register() and get() methods. |
PdfParseError | Base exception for PDF parsing errors. |
PdfParseWarning | Non-fatal parsing issue that was recovered from. |
PdfSecurityError | Encryption or permission related error. |
PdfStream | PdfStream behaves like a mutable mapping; you can retrieve values with get(key, default) and remove entries with pop(key, default). |
PdfString | Class with 1 method and 1 property. |
PdfTrailerable | Class with 1 method. |
PdfValidationError | PDF/A or general structural validation error. |
PdfWriterV0 | Writes SimplePdf to PDF 1.7 format. |
PredefinedCMap | A resolved predefined CMap and its semantic Unicode mapping. |
PredefinedCMapEncoding | Compact code-to-CID view of a predefined CMap. |
RasterizedPage | A rendered PDF page in packed RGB format. |
RecipientPayload | What one opened envelope carries. |
Reshaper | Policy for shaping complex-script replacements during a text edit. |
ResolvedFace | A font program picked for a non-embedded PDF font. |
RevocationResult | Class with 3 properties. |
RichRun | Class with 2 properties. |
RichStyle | The resolved style of a text run. |
SfntFace | Metadata recovered from a single SFNT face. |
Shading | Base class for bounded RGB sampling in a shading’s target space. |
SignedDataInfo | Everything we need from a parsed CMS SignedData. |
SignerVerification | Outcome of verifying a single signer. |
SigningUtils | Utility class for generating certificates and PKCS#7 signatures. |
SimpleFontMetric | Advance metrics for a single-byte simple font, in 1000-unit glyph space. |
SimplePdf | Native Python PDF document representation. |
StandardFonts | Utility class for the PDF Standard 14 fonts. |
StreamDecoder | Decode PDF stream data using supported filters. |
StreamEncoder | Encode raw bytes into PDF stream data, the inverse of :class:StreamDecoder. |
TagTree | The tag tree of B.10.2, used for inclusion and zero-bitplane signalling. |
TextFragmentAbsorber-simple_pdf | Absorber that extracts text fragments from a SimplePdf instance. |
TextObject | A BT … |
TiffPage | One image in a TIFF file. |
TimestampInfo | Result of verifying an RFC 3161 timestamp token. |
TrueTypeOutlines | Decode glyph outlines from an embedded TrueType (glyf) program. |
Type1Outlines | Decode glyph outlines from a Type 1 (/FontFile) font program. |
XmpArray | An ordered XMP array value. |
XmpField | A single XMP property. |
XmpNamespaceProvider | Bidirectional XMP namespace prefix URI resolver. |
XmpPacket | An in-memory XMP packet: an ordered collection of properties. |
XmpProperty | A property carrying arbitrary qualifiers. |
XmpStruct | A structured XMP value (an rdf:parseType="Resource" block). |
Enumerations
| Enumeration | Description |
|---|---|
EncodingType | Enum with 5 members. |
FilterType | The FilterType enum lists the supported stream filter names such as FLATE_DECODE, LZW_DECODE, and DCT_DECODE. |
Generated
| Class | Description |
|---|---|
Document-generated_document | Pythonic wrapper for PDF document lifecycle and core operations. |
PdfAValidateOptions-generated_pdfa | Options for a PDF/A validation run. |
PdfAValidationResult-generated_pdfa | Result of a PDF/A validation run. |
UnsignedContent-generated_forms | Container for unsigned content (pages, form fields, annotations). |
UnsignedContentAbsorber-generated_forms | Extracts unsigned content elements; includes form field/annotation info. |
Security
| Class | Description |
|---|---|
CompromiseCheckResult | Class with 4 properties. |
SignaturesCompromiseDetector | Detect possible compromise indicators around signed PDFs. |