ConvertToPDFE
Compliance, engineering documents
Description
Turns the open document into a PDF/E-1 (ISO 24517-1) engineering document and checks the result
Syntax
Delphi
Function TPDFlib.ConvertToPDFE: Integer;Return values
| 1 | The document now conforms |
|---|---|
| 0 | It does not. Read GetPDFEConversionReport for what stands in the way |
Remarks
The call removes an XFA form (the AcroForm fields stay) and alternate presentations, which PDF/E-1 does not permit, embeds fonts that are not embedded from the installed fonts, and then states PDF/E-1: the document moves to PDF 1.6 and gains the PDF/E output intent, identification and lifecycle metadata. It finishes with the same check the writer applies before saving a PDF/E document
PDF/E-1 requires a document title, which the call does not invent: set one with SetInformation(2, ...) first. An encrypted document, or one that already claims PDF/A or PDF/X, is reported and left unchanged
Example
PDF.LoadFromFile('drawing.pdf', '');
PDF.SetInformation(2, 'Drawing sheet 12');
if PDF.ConvertToPDFE = 1 then
PDF.SaveToFile('drawing-pdfe.pdf')
else
ShowMessage(PDF.GetPDFEConversionReport);