pdf library

Classes

PdfaAttachedFiles
PdfaColorProfile
PdfAcroFormAccess
Single access point to the document /AcroForm during editing.
PdfaFacturxRdf
PdfAnnot
Annotation object wrapper attached to a page.
PdfAnnotationCollection
Typed collection of the annotations already present on a page.
PdfAnnotationView
Typed view of an annotation already present on a loaded page.
PdfAnnotBase
Base class for PDF annotations.
PdfAnnotCircle
Circle annotation.
PdfAnnotInk
Ink list annotation.
Named destination link annotation.
PdfAnnotPolygon
Polygon/polyline annotation.
PdfAnnotSign
Signature widget annotation.
PdfAnnotSquare
Square annotation.
PdfAnnotText
Text annotation.
URL link annotation.
PdfAnnotWidget
Base class for widget annotations (AcroForm).
PdfAppearancePainter
Draws existing appearances onto a page.
PdfAppearanceStream
The existing normal appearance (/AP /N) of an annotation.
PdfaRdf
PdfBaseFunction
PdfBatesNumbering
Sequential Bates-style numbering applied to a range of pages.
PdfBorder
Defines a border object
PdfBox
Page rectangle preserving the four numbers from the file.
PdfButtonField
Button field widget.
PdfCachedRandomAccessReader
Block-based LRU cache for random access reading.
PdfChoiceField
Choice field widget (combo/list).
PdfColor
Represents an RGB color.
PdfColorCmyk
Represents a CMYK color.
PdfColorGrey
PdfColorHsl
Represents an HSL color.
PdfColorHsv
Same as HSB: cylindrical geometry with hue and angular dimension, starting at the red primary at 0°, passing through the green primary at 120° and the blue primary at 240°, and then wrapping back to red at 360°
PdfColors
Material design colors.
PdfContentArray
Array [ … ].
PdfContentBool
true or false.
PdfContentComment
Comment % ….
PdfContentDict
Dictionary << … >>, and also the dictionary of an inline image.
PdfContentFont
Font information sufficient to turn Tj/TJ bytes into text and widths.
PdfContentFormXObject
A form XObject ready to be walked by the extractor.
PdfContentGlyph
A character code already resolved to text and width.
PdfContentLexer
Content stream tokenizer.
PdfContentName
PDF name (/F1, /DeviceRGB, …).
PdfContentNull
null.
PdfContentNumber
Integer or real number.
PdfContentOperator
A content stream operator with its operands.
PdfContentParser
Converts the bytes of a content stream into a list of operators.
PdfContentResources
Access to the resources a content stream references by name.
PdfContentString
Literal string (...) or hexadecimal string <...>.
PdfContentToken
A token with the exact position it occupied in the source bytes.
PdfContentValue
Value that can appear as an operand of a content stream.
PdfContentWriter
Reserializes a list of operators back into content stream bytes.
PdfCoordinateTransformer
Single conversion between "top-left" coordinates and the PDF user space.
PdfDocument
Core PDF document model used to create and serialize PDF files.
PdfDocumentMerger
Merges PDF documents into a destination document.
PdfDocumentParser
Concrete parser for reading an existing PDF.
PdfDocumentParserBase
Base class for loading an existing PDF document.
PdfDocumentProperties
Reading and writing of the document-level properties: metadata, navigation and viewer preferences.
PdfDocumentRewriter
Full rewrite of a PDF, with garbage collection.
PdfEncryption
Encryption object
PdfFlattenedField
A field that the flattening drew and removed.
PdfFont
Pdf font object
PdfFontMetrics
Describe dimensions for glyphs in a font
PdfFormField
Base class for AcroForm fields.
PdfFormFlattener
Real form flattening: draws the appearance and deletes the field.
PdfFormFlattenOptions
Flattening options.
PdfFormFlattenResult
The result of the flattening.
PdfFunction
PdfGraphics
Pdf drawing operations
PdfGraphicState
Graphic state configuration for opacity and blending.
PdfGraphicStates
Stores all graphic states used in the document.
PdfImage
Image object stored in the Pdf document
PdfImageStamp
Image stamp.
PdfInfo
Information object
PdfInlineImage
A complete inline image: BI … ID <bytes> EI.
PdfJpegInfo
JPEG metadata extraction.
PdfLoadedObjectMutator
Makes writable an object that only exists in the bytes of the loaded document.
PdfMapContentResources
Resources built from in-memory maps.
PdfMemoryRandomAccessReader
Implementação em memória (web e uso simples no VM).
PdfMergeOptions
Merge options.
PdfMetadata
Pdf Metadata
PdfName
PdfNameTokens
PDF name tokens used throughout the library.
PdfObjectConverter
Converts the parser's tokenized model (PdfDictToken, PdfArrayToken, PdfNameToken, PdfStringToken, PdfRefToken, numbers, booleans and null) into the writing model (PdfDataType).
PdfObjectId
Identity of an indirect object: the (number, generation) pair.
PdfObjectStore
Single resolution point for the indirect objects of a PdfDocument.
PdfOutline
Pdf Outline object
PdfPage
Page object that holds all contents for a page.
PdfPageCollectionEditor
Page collection with reference repair.
PdfPageContentEditor
Overlay and underlay of content on a page, new or loaded.
PdfPageFormat
Describes a page size and margins in PDF points.
PdfPageLabel
PdfPageLabels
Pdf PageLabels object
PdfParserContentResources
Resources read from a document opened by PdfDocumentParser.
PdfPattern
PdfPoint
Immutable point in PDF user space.
PdfRandomAccessReader
Leitor randômico síncrono para PDF.
PdfRasterBase
Represents a bitmap image.
PdfRect
Immutable rectangle in PDF user space.
PdfReferencePolicy
Ready-made reference policies for the PdfObjectConverter.
PdfRewriteOptions
What the rewrite preserves from the source document.
PdfRewriteReport
Report of what the rewrite did, for logging, auditing and testing.
PdfRewriteResult
Result of the rewrite: the new bytes and the report.
PdfSecurityInspectionResult
PdfSecurityInspector
PdfShading
PdfShadingPattern
PdfSignature
PdfSignatureBase
PdfSignatureFieldEditor
PdfSignatureTools
Convenience helpers for external signing workflows.
PdfSize
Immutable size with width and height.
PdfSoftMask
PdfStamp
Stamp positioned by the PdfCoordinateTransformer.
PdfStitchingFunction
PdfTextExtractionOptions
Text extraction settings.
PdfTextExtractor
Extracts positioned text from a list of content stream operators.
PdfTextField
Text field widget.
PdfTextItem
A run of extracted text with the position it was drawn at.
PdfTextStamp
Single-line text stamp.
PdfTopLeftRect
Rectangle in "top-left" coordinates, the system the user thinks in.
PdfToUnicodeCMap
Result of reading a /ToUnicode CMap.
PdfTtfFont
PdfUriAnnotation
Convenience wrapper for URL annotations.
TtfBitmapInfo
TtfGlyphInfo
TtfParser

Enums

PdfAnnotAppearance
Annotation appearance states.
PdfAnnotFlags
Annotation behavior flags.
PdfAnnotHighlighting
Highlighting modes for widget annotations.
PdfArrayGapPolicy
What to do with an array item that the conversion dropped.
PdfBlendMode
Blend modes for compositing operations.
PdfBorderStyle
Border style
PdfBoxType
The five page boxes defined by the PDF specification.
PdfBrokenReferencePolicy
What to do with a reference that now points to a page that no longer exists.
PdfContentTokenKind
Token categories of a content stream.
PdfExifTag
Possible Exif tags
PdfFieldFlags
AcroForm field flags.
PdfFieldNameConflictPolicy
Policy applied when two documents have form fields with the same name.
PdfImageOrientation
Represents the position of the first pixel in the data stream This corresponds to the exif orientations
PdfInvisibleFieldPolicy
What to do with a widget the reader does not show.
PdfLineCap
Specify the shape that shall be used at the ends of open sub paths and dashes, when they are stroked.
PdfLineJoin
Shape to be used at the corners of paths that are stroked
PdfMergeMode
Page merging strategy.
PdfOpenActionView
View used by an open destination.
PdfOutlineMode
Outline mode
PdfOutlineStyle
Outline style
PdfPageLabelStyle
PdfPageLayout
How the viewer should open the document.
PdfPageMode
Display hint for the PDF viewer.
PdfPageRotation
Page rotation.
PdfShadingType
PdfSigFlags
Signature flags
PdfStampAnchor
Where the stamp anchors within the visible area of the page.
PdfStampLayer
Which layer the stamp is drawn on.
PdfTextFieldAlign
Text alignment for text fields.
PdfTextRenderingMode
Text rendering mode
PdfVersion
PDF version to generate
TtfParserName

Functions

decodePageContent(PdfDocumentParser parser, int pageIndex) → Uint8List?
Content stream of a page, with every part of /Contents concatenated and decompressed.
decodeStreamData(PdfDocumentParser parser, PdfDictToken dict, Uint8List raw) → Uint8List?
Applies the filters of dict over raw.
extractTextFromContent(Uint8List content, {PdfContentResources? resources, PdfTextExtractionOptions options = const PdfTextExtractionOptions()}) → List<PdfTextItem>
Extracts the text of a whole page that is already decoded.

Typedefs

DeflateCallback = List<int> Function(List<int> data)
Callback used to compress the data
PdfIndirectLike = PdfIndirect
PdfIndirect exposed through a local alias, so that the type check does not depend on importing the format directly at every use site.
PdfReferenceResolver = PdfDataType? Function(PdfRefToken ref)
Decides what an indirect reference read by the parser becomes in the writing model.

Exceptions / Errors

PdfMergeException
Merge failure the caller can handle.
PdfPageEditException
Error from an operation of the page collection.