Aspose.PDF FOSS for Python

API reference for Aspose.Pdf FOSS for Python. 265 public types organized by module.

Core API

ClassDescription
ActionBase class for an interactive action.
AsposePdfExceptionBase class for all aspose_pdf exceptions.
ByteArrayDataSourceA data source backed by in-memory bytes.
CdrLoadOptionsOptions for loading CDR files.
CgmLoadOptionsOptions for loading CGM files.
ColorPrimitiveVery small color primitive with transparency support.
DataSourceBase class for plugin inputs and outputs.
DeprecatedFeatureExceptionRaised when a deprecated PDF feature is used that is not allowed in newer PDF versions.
DestinationBase class for a view destination on a document page.
Document-documentPythonic wrapper for PDF document lifecycle and core operations.
FieldA field of an interactive form.
FileDataSourceA data source backed by a file on disk.
FileFontSourceDiscover the font(s) contained in a single file.
FileSpecificationA document-level embedded file (/Filespec) with typed metadata.
FillModeFill mode enumeration for path operations.
FitBDestinationFit the page’s bounding box in the window.
FitBHDestinationFit the bounding-box width with top at the top of the window.
FitBVDestinationFit the bounding-box height with left at the left of the window.
FitDestinationFit the whole page in the window.
FitHDestinationFit the page width with top at the top of the window.
FitRDestinationFit the rectangle (left, bottom, right, top) in the window.
FitVDestinationFit the page height with left at the left of the window.
FolderFontSourceCollect fonts from a directory (optionally recursing into subfolders).
FontDescriptorRepresents a discoverable font.
FontEmbeddingExceptionRaised when there is an error embedding fonts in the PDF.
FontRegistrySingleton registry for resolving well-known font names.
FontRepositoryAggregate font sources and resolve fonts by name.
FontSourceBase class for external font providers.
FontSubstitutionOptionsFont sources the renderer may substitute from.
FormRepresents an interactive form (AcroForm) within a PDF document.
GoToActionJump to a destination within this document.
GoToRActionJump to a destination in another (remote) PDF file.
GradientAxialShadingRepresents axial (linear) gradient shading.
GraphicElementA painted path or a placed image, read from a page’s content stream.
GraphicElementCollectionAn in-memory list of :class:GraphicElement objects.
GraphicsAbsorberAbsorbs graphic elements from PDF pages.
HtmlLoadOptionsOptions for loading HTML documents.
HtmlSaveOptionsOptions for saving PDF documents as HTML.
ImagePlacement-imagesRepresent an image placed on a PDF page.
ImagePlacementAbsorber-imagesAbsorber to collect image placements from PDF pages.
IncorrectCMapUsageExceptionRaised when there is an incorrect usage of CMap.
InvalidFormTypeOperationExceptionException thrown when an invalid form type operation is attempted.
InvalidOperationExceptionRaised when a graphics element is attached to the wrong parent.
InvalidPasswordExceptionRaised when an incorrect password is provided for an encrypted document.
InvalidPdfFileFormatExceptionRaised when the PDF file format is invalid or corrupted.
InvalidValueFormatExceptionRaised when an invalid value is encountered during parsing or conversion.
JavaScriptActionRun a JavaScript script (serialized verbatim, not validated).
LatexFragmentSmall value object that stores LaTeX source text.
LaunchActionLaunch an application or open a file (serialized verbatim).
LayerOne optional content group, and whether it is currently shown.
LayerCollectionThe document’s layers, indexable by position or by name.
LicenseLicense management class for Aspose.PDF.
MarginMargin provides a simple container for page margin values (top, left, bottom, right) that can be passed to layout‑related APIs.
MarkdownSaveOptionsMarkdownSaveOptions 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.
Matrix3DRepresents a 3D transformation matrix.
MemoryFontSourceExpose a font program supplied as in-memory bytes.
MergeOptionsOptions for :class:Merger: concatenate all inputs in order.
MergerConcatenate every input PDF into a single document.
NamedActionA predefined named action, e.g.
NamespaceProviderResolve XMP namespace prefixes and URIs.
OfdLoadOptionsOptions for loading OFD files.
OperationResultA single result produced by a plugin.
OptimizationOptionsOptimizationOptions.to_dict serializes all optimization flags into a dictionary for inspection or JSON output.
OptimizeOptionsOptions for :class:Optimizer.
OptimizerOptimize each input PDF (compression + unused-object cleanup).
OutlineCollectionTop-level collection of :class:OutlineItem bookmarks.
OutlineItemA single bookmark entry in a PDF outline tree.
PageA page of a PDF document.
PageCollectionA collection to manage PDF pages within a Document.
PageInfoClass with 1 property.
PdfAConversionResultResult of a PDF/A conversion operation.
PdfAValidateOptions-pdfaContainer for PDF/A validation settings.
PdfAValidationResult-pdfaDetailed result of a PDF/A validation run.
PdfAValidatorPlugin that runs PDF/A validation on one or more inputs.
PdfConstsClass with 2 methods.
PdfExceptionBase class for PDF-related exceptions.
PdfExtractorSimple PDF text and image extractor.
PdfFileEditorFacade for PDF file editing operations.
PdfIOExceptionRaised when there is an I/O error during PDF processing.
PdfLoadLimitsImmutable safety limits for untrusted PDF input and authored assets.
PdfParseExceptionRaised when there is an error parsing a PDF document.
PdfPluginBase class for low-code plugins.
PdfResourceLimitExceptionRaised when processing a PDF would exceed a configured resource limit.
PdfSecurityExceptionRaised when there is an encryption, signature, or permissions error.
PdfSignatureRepresent a PDF digital signature.
PdfUaValidateOptionsContainer for batch PDF/UA validation settings.
PdfUaValidationResultDetailed result of a PDF/UA structure check (heuristic).
PdfUaValidatorPlugin that runs heuristic PDF/UA validation on one or more inputs.
PdfValidationExceptionRaised when a PDF document fails validation or compliance checks.
PerformanceLoggerPerformanceLogger.log_line(line) records a diagnostic line to the logger’s log property for custom performance tracing.
PluginOptionsHold input/output data sources and their PDF resource-limit policy.
PointRepresents a point in 2D space.
Point3DRepresents a 3D point.
PrinterSettingsClass with 11 properties.
RecipientOne certificate that may open the document, and what it may then do.
RectangleRectangle representing image placement bounds on a PDF page.
RegexResultWraps a single regular-expression match found on a PDF page.
ResetFormActionReset the form’s fields to their default values.
ResultContainerHolds the ordered results of a plugin operation.
SplitOptionsOptions for :class:Splitter: split the first input into single pages.
SplitterSplit the first input PDF into one document per page.
StatisticsEntryEntry for tracking statistics and timing information.
StreamDataSourceA data source backed by a binary stream (e.g.
StructureElementA mutable logical-structure element in a tagged PDF.
SubmitFormActionSend the form’s field values to url.
SvgLoadOptions-load_optionsOptions for loading SVG files.
SvgLoadOptions-svgClass with 1 method and 2 properties.
SystemFontSourceCollect fonts from common system font directories.
TaggedContentEditable view of a document’s logical structure tree.
TaggedContextClass with 4 properties.
TextAbsorberAbsorbs text from PDF pages (legacy class, alias for TextFragmentAbsorber).
TextExtractionOptionsOptions for text extraction from PDF pages.
TextExtractorExtract plain text from each input PDF.
TextExtractorOptionsOptions for :class:TextExtractor: extract text from each input.
TextFormattingModeText formatting mode for text extraction.
TextFragmentA text fragment found inside a PDF page.
TextFragmentAbsorber-textAbsorbs text fragments from a PDF page or document.
TextFragmentCollectionA mutable ordered collection of :class:TextFragment objects.
TextLayoutOptionsConfigure complex-text shaping and line layout for Page.add_text.
TextSearchOptionsOptions controlling how text search is performed.
URIActionResolve a uniform resource identifier (typically a web link).
UnsignedContent-formsRepresents a collection of unsigned content elements in a PDF document.
UnsignedContentAbsorber-formsExtract unsigned form fields and annotations from a PDF document.
UnsupportedFeatureExceptionRaised when a compatibility surface names a feature this package lacks.
ValidationOptionsConfiguration for signature validation.
ValidationResultStructured result returned by signature validation.
VirtualizationPerformanceClass with 5 methods.
WarichuWPElementMinimal tagged-element type for API compatibility.
XYZDestinationPosition (left, top) at the upper-left with an optional zoom.

Enumerations

EnumerationDescription
CertificationLevelDocMDP certification level of a signature.
DocFormatTarget format for a save operation.
DuplexEnum with 4 members.
FieldTypeType of form field.
FormTypeType of PDF form.
PadesLevelPAdES baseline conformance level reached by a signature.
PluginIdentifiers for the available low-code plugins.
PrintRangeEnum with 4 members.
RevocationStatusCertificate revocation outcome (OCSP/CRL).
SaveFormatFormat for saving PDF documents.
StructureTypeStandardEnum with 15 members.
TrustStatusOutcome of building/validating the signer’s certificate chain.
ValidationMethodSelects the signature format / validation algorithm.
ValidationModeControls whether certificate revocation is checked via network.
ValidationStatusOutcome of a :class:ValidationResult.

Annotations

ClassDescription
AnnotationLive view over a single annotation on a page.
AnnotationCollectionMutable sequence-like wrapper over page annotations.
LinkAnnotationConcrete annotation type kept for compatibility with tests/API.
MarkupAnnotationBase class for markup annotations.
PDF3DAnnotationMinimal annotation wrapper for prerelease imports.
PDF3DArtworkContainer for 3D content and named views.
PDF3DContentReference to 3D content stored on disk.
PDF3DViewLightweight description of a saved 3D view.

Enumerations

EnumerationDescription
AnnotationFlagsFlags that define annotation behaviour.
AnnotationTypeKnown annotation subtype names (PDF 32000-1:2008, Table 169).
PDF3DLightingSchemeEnum with 5 members.
PDF3DRenderModePDF3DRenderMode and PDF3DLightingScheme enums let developers choose rendering style (SOLID, WIREFRAME, TRANSPARENT) and lighting (HEADLAMP, WHITE, etc.) for 3D annotations.

Clustering

ClassDescription
ClusterRepresents a cluster of data points.
ClusterCollectionA collection of clusters.
DataPointRepresents a data point in clustering operations.

Engine

ClassDescription
AbsorbedElementOne painted path or placed image, in page (user) space.
AnnotationNameA str subclass that marks a value to be serialized as a PDF name.
AuthoredFontA normalized embedded font and the mutable CID mapping for authored text.
AuthoredImagePrepared image data and PDF image XObject metadata.
BitStreamMinimal bit-oriented buffer used by compatibility code.
BlockOne piece of exported structure.
CffOutlinesDecode glyph outlines from a CFF (Type 2 charstring) font program.
ChainResultResult of building and validating a certificate path.
CharacterCollectionA CIDSystemInfo registry, ordering, and supplement triple.
CidTextCodecCode codec for a composite (Type0) font’s show strings.
CodestreamClass with 2 methods and 8 properties.
ColorRepresents a color in PDF documents.
CompositeFontMetricAdvance metrics for a composite (Type0) font.
ContentStreamParserParse a PDF content stream and extract plain text.
CosExtractorExtract pages, streams, images and metadata from a PdfDocument.
DecodedImageA decoded JPEG 2000 image as interleaved 8-bit samples.
DecodedJpegA decoded JPEG image.
Decoder-ccittClass with 2 methods.
Decoder-jbig2JBIG2 decoder that parses segment structure and extracts bitmap data.
Decoder-jpxJPEG 2000 (JPX) Stream Decoder.
DssMaterialValidation material destined for (or harvested from) a /DSS.
EncodingClass with 1 method and 4 members.
EncryptionUtilsUtility class for PDF-compliant AES-CBC, RC4 encryption, and key derivation.
FontResolverIndex external font sources and resolve PDF font names against them.
GeneratedAppearanceA synthesised appearance: content bytes plus any required ExtGState entries.
GlyphPlacementOne shaped glyph at an em-relative position within a laid-out line.
ImagePlacement-simple_pdfRepresents an image placement on a page.
ImagePlacementAbsorber-simple_pdfAbsorber that finds image placements in a PDF.
IncrementalUpdateGenerate an incremental update section for an existing PDF.
IncrementalWriterUtility that appends incremental updates to an existing PDF.
Jpeg2000ErrorA JPEG 2000 codestream that cannot be decoded.
LayoutElementA positioned piece of page content (a text object or an image paint).
LayoutLineOne visual line with logical replacement text and shaped glyphs.
LayoutResultComplete line layout; glyph coordinates and widths are in em units.
LazyImageDictDictionary that decodes image streams on demand to save memory.
LazyPdfObjectStoreObject-number → COS object map that parses from a :class:PdfCosParser on demand.
MQDecoderThe MQ arithmetic decoder of Annex C.
MatrixMatrix.translate(x, y) shifts a coordinate system, while Matrix.multiply(other) composes two transformations, exposing the underlying a‑f components.
OptionalContentThe document’s optional content groups and their default visibility.
OptionalContentGroupOne optional content group (/OCG) of the document.
ParseWarningsCollects warnings during parsing.
PdfArrayPdfArray provides an items collection and an append method to build PDF array objects.
PdfBooleanPdfBoolean represents a PDF boolean value via its ‘value’ property.
PdfCorruptedErrorUnrecoverable PDF corruption.
PdfCosParserParse a PDF file (bytes) into a :class:PdfDocument.
PdfCosWriterSerialize a :class:PdfDocument to a PDF byte sequence.
PdfDictionaryPdfDictionary behaves like a mapping with get and pop methods to access entries.
PdfDocumentContainer for a PDF’s COS object graph.
PdfEncodingErrorFont or content stream encoding error.
PdfIndirectReferencePdfIndirectReference exposes the object number and generation number of an indirect PDF object.
PdfMalformedErrorRecoverable malformed PDF structure.
PdfNameClass with 1 method and 1 property.
PdfNullRepresent PDF null object.
PdfNumberClass with 1 method and 1 property.
PdfObjectBase class for all PDF COS objects.
PdfObjectIDPdfObjectID exposes the object_number and generation_number of an indirect PDF object, enabling precise identification within the cross‑reference table.
PdfObjectRegistryPdfObjectRegistry lets you register any PdfObject and retrieve it later by its PdfObjectID via the register() and get() methods.
PdfParseErrorBase exception for PDF parsing errors.
PdfParseWarningNon-fatal parsing issue that was recovered from.
PdfSecurityErrorEncryption or permission related error.
PdfStreamPdfStream behaves like a mutable mapping; you can retrieve values with get(key, default) and remove entries with pop(key, default).
PdfStringClass with 1 method and 1 property.
PdfTrailerableClass with 1 method.
PdfValidationErrorPDF/A or general structural validation error.
PdfWriterV0Writes SimplePdf to PDF 1.7 format.
PredefinedCMapA resolved predefined CMap and its semantic Unicode mapping.
PredefinedCMapEncodingCompact code-to-CID view of a predefined CMap.
RasterizedPageA rendered PDF page in packed RGB format.
RecipientPayloadWhat one opened envelope carries.
ReshaperPolicy for shaping complex-script replacements during a text edit.
ResolvedFaceA font program picked for a non-embedded PDF font.
RevocationResultClass with 3 properties.
RichRunClass with 2 properties.
RichStyleThe resolved style of a text run.
SfntFaceMetadata recovered from a single SFNT face.
ShadingBase class for bounded RGB sampling in a shading’s target space.
SignedDataInfoEverything we need from a parsed CMS SignedData.
SignerVerificationOutcome of verifying a single signer.
SigningUtilsUtility class for generating certificates and PKCS#7 signatures.
SimpleFontMetricAdvance metrics for a single-byte simple font, in 1000-unit glyph space.
SimplePdfNative Python PDF document representation.
StandardFontsUtility class for the PDF Standard 14 fonts.
StreamDecoderDecode PDF stream data using supported filters.
StreamEncoderEncode raw bytes into PDF stream data, the inverse of :class:StreamDecoder.
TagTreeThe tag tree of B.10.2, used for inclusion and zero-bitplane signalling.
TextFragmentAbsorber-simple_pdfAbsorber that extracts text fragments from a SimplePdf instance.
TextObjectA BT
TiffPageOne image in a TIFF file.
TimestampInfoResult of verifying an RFC 3161 timestamp token.
TrueTypeOutlinesDecode glyph outlines from an embedded TrueType (glyf) program.
Type1OutlinesDecode glyph outlines from a Type 1 (/FontFile) font program.
XmpArrayAn ordered XMP array value.
XmpFieldA single XMP property.
XmpNamespaceProviderBidirectional XMP namespace prefix URI resolver.
XmpPacketAn in-memory XMP packet: an ordered collection of properties.
XmpPropertyA property carrying arbitrary qualifiers.
XmpStructA structured XMP value (an rdf:parseType="Resource" block).

Enumerations

EnumerationDescription
EncodingTypeEnum with 5 members.
FilterTypeThe FilterType enum lists the supported stream filter names such as FLATE_DECODE, LZW_DECODE, and DCT_DECODE.

Generated

ClassDescription
Document-generated_documentPythonic wrapper for PDF document lifecycle and core operations.
PdfAValidateOptions-generated_pdfaOptions for a PDF/A validation run.
PdfAValidationResult-generated_pdfaResult of a PDF/A validation run.
UnsignedContent-generated_formsContainer for unsigned content (pages, form fields, annotations).
UnsignedContentAbsorber-generated_formsExtracts unsigned content elements; includes form field/annotation info.

Security

ClassDescription
CompromiseCheckResultClass with 4 properties.
SignaturesCompromiseDetectorDetect possible compromise indicators around signed PDFs.