SaveValidationReport
Compliance
Description
Writes the structured validation report of a file to disk as UTF-8.
Syntax
Delphi
Function TPDFlib.SaveValidationReport(Const InputFileName, Password, ReportFileName: WideString; ComplianceTests, Options, ReportFormat: Integer): Integer;Parameters
| InputFileName | The PDF file to validate. |
|---|---|
| Password | The password required to open the file, or an empty string. |
| ReportFileName | The report file to write; missing directories are created. |
| ComplianceTests | Bit mask selecting the checks: 1 = PDF/A, 2 = PDF/UA-1, 0 = both. |
| Options | Passed through to the checks; 1 stops at the first finding of each check. |
| ReportFormat | 0 = XML, 1 = JSON. |
Return values
| 1 | The report was written. |
|---|---|
| 0 | No report file name was given, or the input file does not exist. |
Remarks
The report content is identical to CreateValidationReport; only the delivery differs. Writing the report next to the artefact it describes keeps a build log auditable without holding the document in memory.
Example
if PDF.SaveValidationReport('invoice.pdf', '', 'reports\invoice.xml', 0, 0, 0)= 0 then
ShowMessage('the report could not be written');See also
CreateValidationReport, SavePreflightReport, SavePreflightReportEx