Προηγμένες μέθοδοι ροής εργασίας THotPDF

Αυτή η σελίδα συγκεντρώνει προηγμένες public μεθόδους THotPDF που υποστηρίζουν επιδιόρθωση φορτωμένου εγγράφου, file-backed rewriting, xref-stream parsing, conformance output και shaping workflows

Για κοινό application code προτιμήστε σελίδες εστιασμένες σε εργασίες, όπως page operation methods, loaded form field methods, utility methods και ShapingFeatures

Loaded Document Resolution

Method Usage
DoPageOperationProgressDispatches page-operation progress through the configured progress event
ResolveLoadedObjectResolves a loaded object reference to the object that page operations can inspect or copy
ResolveLoadedDictionaryResolves a loaded object reference and returns it as a dictionary when possible
ResolveLoadedArrayResolves a loaded object reference and returns it as an array when possible
EnsureLoadedRootIndexEnsures that the loaded catalog index is known before object-graph operations continue
MaterializeLazyStreamsLoads deferred stream data before a full rewrite or object-level copy operation
FindLoadedFormFieldByIndexReturns a loaded AcroForm field dictionary by field index and reports its effective name
FindLoadedFormFieldByNameReturns a loaded AcroForm field dictionary by fully qualified field name
ConfigurePDFVersionApplies the currently selected PDF version capabilities to document output settings
RecoverReloadFEKFromBytesRecovers the file encryption key for a reloaded encrypted document when the supplied password matches
LoadedEncryptVersionReports the encryption revision of the currently loaded document
IsObjStmMemberObjectReports whether an object came from an object stream member and needs object-stream-aware handling
SyncMaxObjNumFromLoadedObjectsRescans loaded objects so newly allocated object numbers do not collide with existing numbers

Direct File State and Rewrite

Method Usage
ClearDirectFileStateClears a direct-file state record before a handle is reused or released
GetDirectFileIndexMaps a direct-file handle to the state slot used by the Direct File API
DAFindReplacementIndexFinds the replacement entry for an object number in a direct-file state record
DAReadObjectSourceReads stored object source bytes and generation data from direct-file state
DAStoreObjectSourceStores object source bytes in direct-file state for later rewrite
DAAppendObjectSourceInternalAppends a new object body to the direct-file state and returns its allocated object number
DATryBuildCompressedFileStateBuilds direct-file state for files that use compressed object streams when supported
DADirectLoadObjectFromBodyParses a direct-file object body into a loaded object instance
DARecoverAES256FileKeyRecovers an AES-256 file key from an encryption dictionary and password
DADirectPrepareObjectForAES256EncryptPrepares object dictionaries and streams before AES-256 direct-file encryption
DADirectDecryptObjectAES256Decrypts a parsed direct-file object with the active AES-256 file key
DAWriteDirectAES256RewriteWrites a direct-file AES-256 encrypt or decrypt rewrite to a target file
DADirectEncryptFileAES256Encrypts an existing file with AES-256 through the direct-file rewrite path
DADirectDecryptFileAES256Decrypts an existing AES-256 file through the direct-file rewrite path
DAWriteFullRewriteWrites a full direct-file rewrite using the current state table

XRef Stream and Object Parsing

Method Usage
LoadXRefStreamDocumentLoads a document whose startxref points at an xref stream
LoadXRefStreamDocumentFromFileLoads an xref-stream document from a file and returns key object-location diagnostics
LoadXRefStreamDocumentEncFromFileLoads a password-protected xref-stream document from a file
XRefProbeObjCountReports how many objects the xref-stream loader registered
XRefProbeObjNumReturns the object number at a zero-based diagnostic index
XRefProbeCompactCountReports how many compressed objects were materialized from object streams
XRefProbeType2MismatchesReports object-stream header mismatches found while loading type-2 xref entries
XRefProbeObjHasKeyChecks whether a loaded diagnostic object dictionary contains a named key
XRefProbeObjNameValReturns a name value from a loaded diagnostic object dictionary
XRefProbeCompactObjNumReturns the object number of a compact-object diagnostic entry
XRefProbeType2EncryptedSkippedReports encrypted object streams skipped by the type-2 object-stream loader
XRefProbeCountReplacementCharsCounts Unicode replacement characters in loaded string diagnostics
XRefProbeObjStringValReturns a string value from a loaded diagnostic object dictionary
XRefProbeDecryptObjStmSkipsReports object-stream member decrypt skips used to avoid double decryption
TryParseModernPDFAttempts the modern PDF parse path for xref-stream and object-stream documents
CreateBasicPageContentCreates minimal page content objects for a loaded or synthesized page
CreatePDF16PageReferenceCreates a PDF 1.6 page reference using the loaded object graph
CreateBasicResourcesCreates a minimal resource dictionary for page reconstruction
CreatePDF16ResourcesCreates a PDF 1.6 resource dictionary for page reconstruction
ParseSimplePageObjectParses a simple page object into the loaded page representation
ParseRealPageContentParses the original page content stream for a loaded page
ProcessObjectStreamsForDecompressionProcesses object streams before decompressed objects are inspected or copied
ScanAndLoadReferencedObjectsScans page and resource dictionaries and loads referenced objects
ForceLoadMissingReferencedObjectsLoads references that were not materialized during the first parse pass
FindAllObjectStreamsLocates object streams in the loaded document graph
ExtractStreamParametersExtracts object-stream length, count, and first-object offset values
ProcessFlateDecodeProcesses FlateDecode-compressed object-stream bytes
AnalyzePageObjectAnalyzes a page object body and updates loaded page bookkeeping
ExtendPageArrAdds a page indirect object to the loaded page array
ParseSimpleDictionaryParses a dictionary body into a THPDFDictionaryObject
ParseSimpleArrayParses an array body into a THPDFArrayObject
ParseSimpleStreamParses a stream body into a THPDFStreamObject
FindAndProcessObjectStreamFinds an object stream by object number and processes its members
ExtractObjectFromStreamExtracts a parsed dictionary object from an object stream member
ExtractRawObjectFromStreamExtracts raw object bytes from an object stream member
IsObjectInStreamReports whether an object number belongs to an object stream
GetObjectFromStreamReturns a parsed object-stream member as a dictionary object
ParseModernPageObjectParses a page object found through the modern object-stream path
IntelligentDecompressAttempts decompression with format-aware fallback logic
DecompressFlateDecodeDecompresses FlateDecode stream bytes
ParseObjectStreamParses an object stream header and member table
ReorderPageArrByPagesTreeReorders loaded pages according to the page tree
GetCorrectPageOrderFromPagesTreeBuilds the page order from the loaded page tree
GetPageObjectIdReturns the object number for a loaded page index
GetPageArrIndexForObjectNumberReturns the loaded page-array index for a page object number
ExtractNumericValueExtracts an integer value after a named key in raw object content
ParseDecompressedObjectsParses decompressed object-stream members and returns key object numbers
LoadCompressedXrefStreamLoads compressed xref stream data for modern document parsing
LoadObjectStreamsDirectlyLoads object streams directly from the current source document
ParseXrefStreamDataParses decoded xref-stream table data
ProcessObjectStreamObjectsProcesses decompressed object-stream objects from a stream object number

Conformance and Font Output

Method Usage
BuildAndApplyUnicodeFontSubsetBuilds the active Unicode font subset and applies the resulting font stream and mapping data
EnsurePDFUATabsOnAnnotatedPagesEnsures annotated PDF/UA pages declare the required tab order
EnsurePDFAOutputIntentChecks that a PDF/A output intent is present when the selected PDF/A profile requires one
EnsurePDFAColorSpaceConsistencyChecks device colour-space usage against PDF/A output-intent and default-colour-space settings
EmitDocumentDefaultColorSpacesWrites document default colour-space mappings used by PDF/A workflows
EnsurePDFXOutputIntentChecks that a PDF/X output intent is present before output is finalized
EnsurePDFXPageBoxesChecks page boxes required by PDF/X output profiles
_FindPAdESDSSStreamByDERFinds an existing DSS stream whose DER bytes match a certificate, OCSP response, or CRL while building PAdES VRI references

Advanced Shaping Helpers

Method Usage
ApplyArabicGSUBPositionalApplies Arabic positional GSUB substitutions and maps shaped glyph IDs through synthetic codepoints
ArabicGSUBShapeToGIDsReturns the Arabic GSUB-shaped glyph-ID sequence without emitting text
ApplyArabicGSUBNativeShapingApplies native Arabic GSUB shaping for fonts that provide positional glyph substitutions
ApplyLatinLigatureFeatureApplies a named Latin ligature feature such as liga or clig to a Unicode run
ApplyLatinSingleSubstitutionFeatureApplies a named Latin single-substitution feature to a Unicode run
ApplyLatinFractionFeatureApplies the frac feature to a numeric fraction run when the font supplies the required substitutions
ApplyArabicGSUBRefinementApplies Arabic GSUB ligature refinement after the base Arabic shaping pass
_ApplyGSUBLookupAtApplies one resolved GSUB lookup at a glyph-run position and reports the updated span
_ApplyGSUBFeatureToRunApplies all lookups for one GSUB feature across a glyph run in lookup-list order
_ApplyGSUBFeatureAtRunPositionApplies a GSUB feature at one glyph-run position for position-sensitive shaping passes
_TibetanShapeSpanToGIDsShapes one Tibetan span to glyph IDs before synthetic-codepoint output
_GSUBResolveIndicScriptChooses the OpenType Indic script tag available in the font, preferring v2 script tags when present
_IndicShapeSyllableToGIDsApplies the Indic GSUB feature chain to one reordered syllable and returns glyph IDs

See also