PDFium Delphi Component Docs

ValidatePdfR method

Requires Small Business or Enterprise since 3.266.0; the public unit and method names are unchanged

Since 3.267.0, ValidatePdfRasterSource provides combined raw-file and native page-fact inspection of one original-byte snapshot without reserialising it

This method validates a native reserialisation and native page facts; the reserialisation can omit an original PDF/R footer marker, so use ValidatePdfRComplianceWithOptions on the original saved stream when checking exact delivered bytes, together with the page-fact checks required by the selected profile

Component: TPdf  ·  Unit: PDFium
Inspects the active PDF for PDF/R-1 file, metadata, raster-content, strip-geometry, colour, resolution, and compression requirements

Syntax

function ValidatePdfR: TPdfRValidationResult; overload;
function ValidatePdfR(const Options: TPdfRValidationOptions): TPdfRValidationResult; overload;

Description

ValidatePdfR combines a raw-file inspection with a live PDFium page-object pass for ISO 23504-1:2020

TPdfRValidationOptions.Default checks 72 to 2400 DPI, permits 0.5 point geometry tolerance, requires a full-page strip, and enforces the encrypted PDF 2.0 profile

The result is a TPdfRValidationResult record:

The method is read-only and restores the caller's active page after validation

Remarks

Example

uses System.TypInfo;

var
  Outcome: TPdfRValidationResult;
  Issue: TPdfRValidationIssue;
begin
  Pdf1.FileName := 'C:\Incoming\scan.pdf';
  Pdf1.Active := True;
  Outcome := Pdf1.ValidatePdfR;
  Memo1.Lines.Add('Level: ' + GetEnumName(TypeInfo(TPdfRConformance),
    Ord(Outcome.Conformance)));
  for Issue in Outcome.Issues do
    Memo1.Lines.Add('- ' + GetEnumName(TypeInfo(TPdfRValidationIssue), Ord(Issue)));
end;

See Also

PdfRConformance, SaveAsPdfR, SaveAsPdfRToStream, ValidatePdfA, ValidatePdfX