PdfDocumentParser class
Parser concreto para leitura de PDF existente.
Foco: robustez com PDFs do mundo real, incluindo arquivos com problemas estruturais comuns (ex.: saídas antigas do iText).
- Inheritance
-
- Object
- PdfDocumentParserBase
- PdfDocumentParser
Constructors
- PdfDocumentParser(Uint8List bytes, {bool enableCache = true, int cacheBlockSize = 256 * 1024, int cacheMaxBlocks = 32, bool allowRepair = false})
- PdfDocumentParser.fromReader(PdfRandomAccessReader reader, {bool enableCache = true, int cacheBlockSize = 256 * 1024, int cacheMaxBlocks = 32, bool allowRepair = false})
Properties
- bytes → Uint8List
-
The existing PDF document content.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- reader → PdfRandomAccessReader
-
Random access reader.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
The objects size of the existing PDF document.
no setteroverride
- version → PdfVersion
-
The PDF version of the parsed document.
no setteroverride
- xrefOffset → int
-
The offset of the previous cross reference table.
no setteroverride
Methods
-
asIntArray(
dynamic value) → List< int> ? -
extractImages(
{int? fromPage, int? toPage, bool includeUnusedXObjects = false}) → List< PdfImageInfo> - Extrai imagens do PDF com suporte a faixa de páginas.
-
extractInfo(
{int? maxPages}) → PdfDocumentInfo -
extractSignatureFieldEditContext(
) → PdfSignatureFieldEditContext -
Extrai informações completas para edição de campos de assinatura.
override
-
extractSignatureFields(
) → List< PdfSignatureFieldInfo> - Extrai informações de campos de assinatura (/FT /Sig).
-
mergeDocument(
PdfDocument pdfDocument) → void -
Imports the existing objects into the new PDF document.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readStreamData(
PdfIndirectRef ref) → Uint8List? - Lê os bytes brutos do stream de um objeto indireto. Útil para extração de imagens (retorna o stream sem decodificar filtros).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited