SetTrapped
Document properties, Print production
Description
Declares whether trapping has been applied to the document, through the Info dictionary /Trapped entry.
Syntax
Delphi
Function TPDFlib.SetTrapped(State: Integer): Integer;Parameters
| State | 0 writes /Unknown, 1 writes /True (trapping applied), 2 writes /False (not trapped). |
|---|
Return values
| 0 | Invalid state, or no document is selected. |
|---|---|
| 1 | The state was written. |
Remarks
PDF/X requires this key so a print provider can tell whether the file still needs trapping. The value is a name rather than a text string (ISO 32000-1 14.11.6), which is why it has its own setter instead of going through SetInformation. Writing it raises the document to PDF 1.3 where necessary.
Example
PDF.SetTrapped(2); // not trapped
PDF.SetOutputIntentSubtype('GTS_PDFX');