PDFium Component Docs

FPdfPreflightReport Moduł

Ten wpis API zachowuje identyfikatory, sygnatury, bloki kodu i terminy PDF w oryginalnej postaci.
Moduł: FPdfPreflightReport
Tworzy wielokrotnego użytku obiekt raportu na podstawie wbudowanych walidatorów standardów PDF i eksportuje raport jako tekst, HTML, Markdown, JSON lub CSV

Składnia

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

Typy publiczne

TypOpis
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.

Opis

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.

Formaty wyjściowe

FormatStruktura
TextTekst źródłowy, czas wygenerowania, uwaga o zakresie, podsumowanie, wiersze standardów, plan działania, kategorie problemów i szczegóły problemów
HTMLSamodzielny raport HTML ze stylowaniem statusu, tabelą kategorii problemów, tabelą standardów i tabelą problemów
MarkdownNagłówki i tabele Markdown dla standardów, kategorii problemów, planu działania i szczegółów problemów
JSONStrukturalny obiekt z format, sourceKind, summary, issueCategoryCounts i tablicami problemów dla poszczególnych standardów
CSVWiersze przyjazne arkuszom kalkulacyjnym identyfikowane przez RowType: Summary, Standard, Category i Issue

Uwagi

Przykład

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;

Zobacz też

ValidatePdfA, ValidatePdfX