Docs PDFiumVCL

FPdfPreflightReport unit

Esta entrada API preserva identificadores, assinaturas, blocos de código e termos PDF em sua forma original.
Unit: FPdfPreflightReport
Builds a reusable report object from the built-in PDF standards validators and exports the report as text, HTML, Markdown, JSON, or CSV.

Syntax

function BuildPdfPreflightReport(Pdf: TPdf): TPdfPreflightReport; overload;
function BuildPdfPreflightReport(Pdf: TPdf; Standards: TPdfPreflightStandards): TPdfPreflightReport; overload;
function PdfPreflightStandardName(Standard: TPdfPreflightStandard): string;
function PdfPreflightStatusName(Status: TPdfPreflightStatus): string;

Public Types

TypeDescription
TPdfPreflightStandardStandard selector with ppsPdfA, ppsPdfUa, ppsPdfE, ppsPdfX, ppsPdfR, and ppsPdfVT.
TPdfPreflightStandardsSet type used by BuildPdfPreflightReport; AllPdfPreflightStandards selects every supported standard.
TPdfPreflightStatusPer-standard status: pfsPass, pfsActionRequired, or pfsReview.
TPdfPreflightIssueIssue row with standard, issue code, category, description, and recommendation.
TPdfPreflightIssueCategoryCountAggregated issue-category row returned by IssueCategoryCounts.
TPdfPreflightStandardResultOne standard result with conformance name, compliance flag, status text, priority, next action, and issue rows.
TPdfPreflightReportComplete report with source file, generation timestamp, scope note, standard results, summary counters, and export helpers.

Description

BuildPdfPreflightReport calls ValidatePdfA, ValidatePdfUa, ValidatePdfE, ValidatePdfX, ValidatePdfR, and ValidatePdfVT for an active TPdf document and returns a TPdfPreflightReport.

The report contains one row per selected standard, the detected conformance name, TPdfPreflightStatus, status text, priority, next-action guidance, issue codes, issue categories, issue-category counts from TPdfPreflightReport.IssueCategoryCounts, and a recommended action for each issue. StandardCount, CompliantStandardCount, TotalIssueCount, and IssueCategoryCounts expose the same summary data programmatically.

TPdfPreflightReport.ToText, ToHtml, ToMarkdown, ToJson, and ToCsv return report content, while SaveTextToFile, SaveHtmlToFile, SaveMarkdownToFile, SaveJsonToFile, and SaveCsvToFile write it to disk.

Output Formats

FormatShape
TextPlain-text source, generated time, scope note, summary, standard rows, action plan, issue categories, and issue details.
HTMLStandalone HTML report with status styling, an issue-category table, standard table, and issue table.
MarkdownMarkdown headings and tables for standards, issue categories, action plan, and issue details.
JSONStructured object with format, sourceKind, summary, issueCategoryCounts, and per-standard issue arrays.
CSVSpreadsheet-friendly rows identified by RowType: Summary, Standard, Category, and Issue.

Remarks

Example

uses FPdfPreflightReport;

var
  Report: TPdfPreflightReport;
begin
  Pdf1.FileName := 'C:\Incoming\job.pdf';
  Pdf1.Active := True;
  Report := BuildPdfPreflightReport(Pdf1, [ppsPdfA, ppsPdfX]);
  Memo1.Lines.Text := Report.ToText;
  Report.SaveHtmlToFile('C:\Incoming\job.preflight.html');
  Report.SaveMarkdownToFile('C:\Incoming\job.preflight.md');
  Report.SaveJsonToFile('C:\Incoming\job.preflight.json');
  Report.SaveCsvToFile('C:\Incoming\job.preflight.csv');
end;

See Also

ValidatePdfA, ValidatePdfX