ConvertToPDFUAEx

PDF/UA

Description

Converts the selected document to PDF/UA-1, PDF/UA-2, or WTPDF 1.0 using explicit tagging, fallback synthesis, and metadata retention flags

Syntax

Delphi

Function TPDFlib.ConvertToPDFUAEx(TargetMode: Integer; Const Language: WideString; Options: Integer): Integer;

Parameters

TargetMode1 through 5 as in ConvertToPDFUA
LanguageBCP 47 language tag, or an empty string
OptionsBitmask combining 0 (default), 1 (PDF_PDFUA_OPT_NO_AUTOTAG to reject untagged documents without running auto-tagging), 2 (PDF_PDFUA_OPT_SYNTHESIZE_DEFAULTS to synthesize default title, language, and fallback /Alt descriptions when absent), and 4 (PDF_PDFUA_OPT_KEEP_INFO_DICT to retain the trailer /Info dictionary in PDF 2.0 targets)

Return values

1The converted document passed verification and replaced the selected document
0Conversion was rejected and the original document was preserved; inspect GetPDFUAConversionReport

Example

if PDF.ConvertToPDFUAEx(PDF_PDFUA_TARGET_UA2_WTPDF, 'en-US', PDF_PDFUA_OPT_SYNTHESIZE_DEFAULTS) = 1 then
  PDF.SaveToFile('accessible-wtpdf.pdf');

See also

ConvertToPDFUA, GetPDFUAConversionReport, SetPDFDeclarations