|
THotPDF.BeginIncrementalUpdate
|
Top Methods Next |
|
Loads an existing PDF and switches the document into append-only incremental update mode.
Delphi syntax: procedure BeginIncrementalUpdate(const SourceFile: TFileName); overload; procedure BeginIncrementalUpdate(const SourceFile: TFileName; const Password: AnsiString); overload;
C++ syntax: void __fastcall BeginIncrementalUpdate(System::Sysutils::TFileName SourceFile); void __fastcall BeginIncrementalUpdate(System::Sysutils::TFileName SourceFile, const System::AnsiString Password);
Description Call BeginIncrementalUpdate when an existing PDF must be extended without rewriting its original bytes. HotPDF parses the active trailer or xref-stream dictionary, captures its permanent and modification IDs, keeps the source file write-locked through a file-backed stream, and holds on to only a bounded tail probe instead of a complete copy of the source
New indirect objects and mutations performed through the loaded-document APIs are tracked automatically. Use MarkDirty when code changes an object by a path outside the official mutation hooks
For a Standard-encrypted source, pass either its user or owner password to the two-argument overload. For a public-key encrypted source, assign The encryption dictionary is inherited from the source revision and cannot be introduced, replaced or reconfigured whilst incremental mode is active. Unsupported heterogeneous explicit crypt-filter rewrites fail before output rather than emitting ciphertext under a different policy
This workflow is useful for adding a later signature field, appending metadata, or extending an already signed document whilst preserving the byte ranges covered by earlier digital signatures. The active trailer is used even when the source already contains several revisions
Adding a second signature Once the document is loaded no page is current, so the signable field is added with AddLoadedSignedSignatureField, which takes the page index as a parameter. It sets aside the signature space that
See also: MarkDirty, SaveIncrementalUpdate, AddLoadedSignedSignatureField, GetIncrementalUpdateSourceInfo, AcroForm Support, PDF Filter Support |