SetDocumentIDSeed
Document properties, Optimisation
Description
Supplies an explicit seed for the reproducible trailer file identifier
Syntax
Delphi
Function TPDFlib.SetDocumentIDSeed(Const Seed: WideString): Integer;Parameters
| Seed | Any text that identifies the logical document, for example an order number or a content fingerprint. Pass an empty string to select content-derived hashing. |
|---|
Return values
| 1 | Seed stored successfully. |
|---|
Remarks
The seed only takes effect while reproducible file identifiers are enabled with SetDeterministicDocumentID. Documents saved with the same non-empty seed carry the same trailer /ID; changing the seed changes the identifier on the next full save. An empty seed selects streaming SHA-256 over normalised serialised content, including page, resource, attachment and metadata objects while excluding cross-reference data, trailer offsets and the previous trailer identifier
Example
PDF.SetDeterministicDocumentID(1);
PDF.SetDocumentIDSeed('report-batch-42');
PDF.SaveToFile('report.pdf');See also
SetDeterministicDocumentID, GetDeterministicDocumentID, GetDocumentFileID