PDFium Delphi Component Docs

PDF standards helper units

These units expose the stream-level injectors, validators, signing operations and support records used by the corresponding TPdf convenience methods

Use them when a workflow already owns source and destination streams or needs validation options and result details that are independent of a TPdf instance

Edition runtime requirements: FPdfAssocFiles, FPdfPdfa, FPdfPdfua and baseline FPdfPades signing and structural validation come with Single; FPdfPdfr needs Small Business or Enterprise; FPdfPdfe, FPdfPdfx, FPdfPdfvt and the advanced PAdES LTV/trust/remote-signing/evidence workflows require Enterprise

FPdfPdfCommon

FunctionPurpose
AnsiCountDictKeyTokensCounts one decoded name key at the top level of a raw PDF dictionary whilst skipping nested values, strings and comments
TPdfParserResourceBudgetDefines process-wide recursion, token, object, decoded-byte, expansion-ratio, allocation and deadline limits; Default returns the library defaults
ConfigurePdfParserResourceBudgetValidates and atomically replaces the process policy used by later custom parser operations
GetPdfParserResourceBudgetReturns a thread-safe value snapshot of the current process policy
ResetPdfParserResourceBudgetRestores the default process policy
PdfParserStartTick, PdfParserDeadlineReachedProvide wrap-safe deadline checkpoints for custom parser implementations

FPdfAssocFiles

procedure InjectAssociateFiles(Source: TStream; Dest: TStream; const Options: TAssocFilesOptions);

Public typePurpose
TPdfAFRelationshipISO 32000-2 AFRelationship values afSource, afData, afAlternative, afSupplement, afUnspecified, afEncryptedPayload, afFormData and afTemplate, including the PDF 2.0 additions
TAssociateFileOne associated file with FileName, Description, payload Content, Relationship and optional MIMEType
TAssocFilesOptionsAssociated-file Files list and catalog or page TargetPage, with defaults from TAssocFilesOptions.Default
EPdfAssocFilesErrorRaised by InjectAssociateFiles when the source has no readable trailer or catalog, or when TargetPage is negative or does not name a page in page-tree order; the destination stream is left unmodified

FPdfPades

FunctionPurpose
InjectPadesDssMarkersAdds DSS certificate, OCSP, CRL and VRI material through an incremental update
RenewPadesArchiveTimestampAppends a document timestamp and reports the resulting archive level and timestamp metadata
ValidatePadesCompliance, ValidatePadesTrustValidate top-level signature-entry cardinality, exact ByteRange and Contents-token exclusion, cryptographic integrity, trust, revocation and timestamp evidence
AnalyzePadesSignatureRevisionsClassifies later revisions, object changes, FieldMDP effects and modification risks
BuildPadesEvidenceReport, BuildPadesEvidenceReportBytesBuild bounded multi-signature evidence from a stream or an existing immutable source-byte capture
EvaluatePadesSignatureAlgorithm, InspectPadesSignatureAlgorithmInspect CMS and certificate algorithm parameters and evaluate their supported security status, applying the PDF 2.0 elliptic-curve profile and the ETSI TS 119 312 RSA signature suites
VerifyCmsAlgorithmProtectionChecks the CMS algorithm-protection signed attribute against the signer digest and signature algorithms
SignPadesBytesAppends a local PAdES signature with optional RFC 3161 timestamping
SignPadesBytesForDigestSame signature path for a chosen TCmsDigestAlgorithm: the document ByteRange digest, the CMS signed attributes and the signer's declared algorithm all follow the request, which is how a SHA-3 signature is produced
PreparePadesRemoteSignature, CompletePadesRemoteSignaturePrepare and complete a bound fixed-width remote-signing placeholder workflow
SavePadesRemoteSigningRequest, LoadPadesRemoteSigningRequestPersist or restore the request metadata required to complete remote signing

Public PAdES types

AreaTypes
Levels and validationTPadesLevel (plUnknown, plNone, plB_B, plB_T, plB_LT, plB_LTA), TPadesValidationIssue, TPadesValidationIssues, TPadesValidationSourceStatus (pvssUnavailable, pvssOriginalBytes, pvssIncomplete), TPadesValidationResult
CryptographyTPadesCryptoStatus (pcsNotChecked, pcsValid, pcsInvalid, pcsUnsupported, pcsIndeterminate), TPadesSignatureAlgorithmFamily (psafUnknown, psafRsa, psafEcdsa, psafEd25519, psafEd448), TPadesSignatureAlgorithmInfo, TPadesSignatureValidation, TPadesSignatureValidations
Qualified trustTPdfTrustedListEvaluation, IPdfQualifiedTrustEvaluator
Trust validationTPadesTrustNetworkPolicy (ptnpOffline, ptnpOnline), TPadesTrustValidationStage, TPadesTrustValidationProgress, TPadesTrustValidationProgressEvent, TPadesTrustValidationOptions, TPadesTrustValidationAsyncStatus, TPadesTrustValidationCompletion, TPadesTrustValidationReply
Revision analysisTPadesRevisionAnalysisStatus (prasNotChecked, prasNoLaterChanges, prasAllowed, prasDisallowed, prasSuspicious, prasIndeterminate), TPadesRevisionDecision (prdAllowed, prdDisallowed, prdSuspicious, prdIndeterminate), TPadesFieldMdpAction (pfmaNone, pfmaAll, pfmaInclude, pfmaExclude, pfmaUnknown), TPadesRevisionChangeKind, TPadesRevisionRisk, TPadesRevisionRisks, TPadesFieldNames, TPadesRevisionObjectChange, TPadesRevisionObjectChanges, TPadesSignatureRevisionAnalysis, TPadesSignatureRevisionAnalyses, TPadesRevisionAnalysisReport
Evidence reportsTPadesHashStrings, TPadesObjectNumbers, TPadesEvidenceReportOptions, TPadesEvidenceMaterialKind, TPadesValidationMaterialEvidence, TPadesValidationMaterialEvidences, TPadesVriEvidence, TPadesVriEvidences, TPadesSignatureEvidence, TPadesSignatureEvidences, TPadesEvidenceReport
DSS and archive timestampsTPadesDssMaterial, TPadesDssMaterials, TPadesDssIndexes, TPadesDssVri, TPadesDssVris, TPadesDssOptions, TPadesArchiveTimestampOptions, TPadesArchiveTimestampReport
SigningTPadesSeedValueConstraint, TPadesSeedValueConstraints, TPadesSignatureFieldOptions, TPadesSignOptions, TPadesRemoteSignOptions, TPadesRemoteByteRange, TPadesRemoteSigningRequest

TPadesValidationResult provides the archive Level, the Issues set, SourceStatus, IntegrityStatus and the per-signature Signatures array, with IsCompliant, IsCompliantAt, IsCryptographicallyValid and DocTimeStampCount counting Document Time-stamp dictionaries; option records provide a static Default initialiser

TPadesSignatureAlgorithmInfo reports Family, DigestAlgorithmOid, SignatureAlgorithmOid, PublicKeyAlgorithmOid, CurveOid, DigestParametersPresent, DigestParameterBits, SignatureParametersPresent, PublicKeyParametersPresent, PublicKeyParametersAreNamedCurve and PolicyStatus; TPadesSignatureValidation adds IsDocumentTimeStamp, CoveredRevisionLength, the ByteRangeStatus, CmsSignatureStatus, AlgorithmPolicyStatus, SigningCertificateStatus, CertificateTrustStatus, QualifiedTrustStatus, RevocationStatus, TimeStampStatus, TimeStampSignatureStatus, TimeStampTrustStatus and TimeStampRevocationStatus verdicts, NativeSignatureError, NativeTrustError, SignerCertificateSha256, CertificateChainSha256 and the nested AlgorithmInfo and QualifiedTrust evidence

TPadesTrustValidationStage walks ptvsStarting, ptvsReadingSource, ptvsParsingSignatures, ptvsCryptographicIntegrity, ptvsCertificateChain, ptvsAiaRetrieval, ptvsOcspRetrieval, ptvsCrlRetrieval, ptvsTimestampToken and ptvsCompleted; TPadesTrustValidationProgress carries Stage, SignatureIndex, SignatureCount and Percent; TPadesTrustValidationOptions selects the NetworkPolicy, CheckRevocation, CheckTimeStamps, UrlRetrievalTimeoutMs, QualifiedTrustEvaluator, CancellationToken and OnProgress; TPadesTrustValidationAsyncStatus is ptvasSuccess, ptvasCancelled, or ptvasFailure, and TPadesTrustValidationCompletion returns the async Status, Validation, ErrorMessage, ErrorClassName and CancellationReason

TPadesRevisionChangeKind classifies prckCrossReference, prckSignature, prckValidationMaterial, prckFormField, prckAnnotation, prckPageContent, prckDocumentStructure, prckMetadata, prckActiveContent, prckDeletedObject, prckCompressedObject and prckUnknown; TPadesRevisionRisk spans prrMalformedRevisionChain, prrDuplicateObjectDefinition, prrUnreferencedObjectDefinition, prrSignatureObjectRedefined, prrPageContentChanged, prrDocumentStructureChanged, prrActiveContentAdded, prrFieldMdpUnresolved, prrCompressedObjectUnresolved, prrCoveredRevisionNotFound and prrResourceLimitExceeded

TPadesRevisionObjectChange reports RevisionIndex, ObjectNumber, Generation, Offset, ObjectStreamNumber, ObjectStreamIndex, Kind, Decision, IsAuthoritative and IsRedefinition; TPadesSignatureRevisionAnalysis adds SignatureIndex, SignatureObjectNumber, CoveredRevisionLength, CoveredRevisionIndex, DocMdpPermission, FieldMdpAction, FieldNames, LaterRevisionCount, Status, Risks and Changes; TPadesRevisionAnalysisReport aggregates SourceStatus, RevisionCount, SignatureCount, Status, Risks, Signatures and ErrorMessage

TPadesEvidenceMaterialKind selects pemkCertificate, pemkOcsp, or pemkCrl; TPadesValidationMaterialEvidence reports Kind, ObjectNumber, StoredLength and Sha256 for each stored stream; TPadesVriEvidence is keyed by Key and ObjectNumber and lists CertificateObjectNumbers, OcspObjectNumbers and CrlObjectNumbers

TPadesSignatureEvidence captures SignatureIndex, SignatureObjectNumber, IsDocumentTimeStamp, SubFilter, ByteRangeA, ByteRangeB, ByteRangeC, ByteRangeD, ContentsSha256, VriKey, SignaturePolicyOid, CommitmentTypeOid, HasMatchingVri, VriEvidenceIndex, TimeStampTokenSha256, TimeStampPolicyOid, TimeStampGenTime, TimeStampNonce, NativeFactsAvailable, NativeReason, NativeTime, NativeDocMdpPermission and the nested Validation and Revision

TPadesEvidenceReport aggregates SourceLength, PdfiumSignatureCount, DssCertificateCount, DssOcspCount, DssCrlCount, DssVriCount, StoredValidationBytes, IsTruncated, Validation, RevisionAnalysis, Signatures, ValidationMaterials and VriEntries, bounded by TPadesEvidenceReportOptions with TrustOptions, MaxSourceBytes, MaxSignatures, MaxRevisionChangesPerSignature, MaxValidationMaterials, MaxStoredValidationBytes and MaxVriEntries

TPadesDssMaterial stores one DerBytes certificate, OCSP or CRL payload; TPadesDssVri selects document-level material through SignatureContents, CertIndexes, OcspIndexes and CrlIndexes; TPadesDssOptions accepts Certs, Ocsps, Crls, Vris, EsicExtensionLevel and IncludeVri; TPadesArchiveTimestampOptions carries TsaUrl, Nonce, ContentsSize, UpdateDss and the nested DssOptions; TPadesArchiveTimestampReport reports SourceLevel, ResultLevel, PreviousDocTimeStampCount, ResultDocTimeStampCount, SourceLength, ResultLength, DssUpdated, GenTime, PolicyOid and Nonce

TPadesSeedValueConstraint constrains psvcFilter, psvcSubFilter, psvcVersion, psvcReasons, psvcLegalAttestation, psvcAddRevocationInfo or psvcDigestMethod; TPadesSignatureFieldOptions constrains FieldName, RequiredSeedValues, Reasons, LegalAttestations, AcceptableCertificates, CertificateRequired, LockAction, LockFields and CertificationPermission; TPadesSignOptions carries CertificateThumbprint, PaddingScheme, Reason, LegalAttestation, Location, ContactInfo, Name, SigningTimeUtc, CommitmentTypeOid, ContentsSize, Level, TsaUrl, Nonce, the SignaturePolicyOid, SignaturePolicyHash, SignaturePolicyUri and SignaturePolicyDocument group, and nested FieldOptions; TPadesRemoteSignOptions mirrors the remote-safe subset Reason, LegalAttestation, Location, ContactInfo, Name, SigningTimeUtc, CommitmentTypeOid, ContentsSize, FieldOptions and DigestAlgorithm; TPadesRemoteSigningRequest binds FormatVersion, PreparedFingerprint, DocumentDigest, ByteRange, ContentsHexOffset, ContentsSize and DigestAlgorithm

IPdfQualifiedTrustEvaluator.EvaluateQualified(LeafCertificate, CertificateChain, ValidationTime, Evaluation) is the pluggable qualified-trust policy assigned to TPadesTrustValidationOptions.QualifiedTrustEvaluator; the Enterprise EU trusted list implements it, and any caller implementation can supply the result

TPdfTrustedListEvaluation reports Evaluated, Matched, Qualified and Current separately from operating-system chain trust, together with the selected service's Territory, ProviderName, ServiceName, ServiceTypeIdentifier, ServiceStatus and StatusStartingTime; TPadesSignatureValidation.QualifiedTrust retains it

TPadesTrustValidationOptions.QualifiedValidationTime selects the trusted-list service-history evaluation time, with zero selecting the current time

TPadesTrustValidationOptions.RetrievalPolicy selects the TPdfCryptoRetrievalPolicy mode used for the online trust material it fetches, and AllowedRetrievalOrigins carries the TPdfCryptoRetrievalOrigins allow-list that the allowed-origin, allowed-IP-origin and pinned-origin policies match against; the offline policy reads no allow-list and never opens a network connection

TPadesSignatureValidation also carries RevocationReason: TPdfCmsRevocationReason, NativeRevocationError: Cardinal, TimeStampRevocationReason: TPdfCmsRevocationReason and NativeTimeStampRevocationError: Cardinal. Signature diagnostics come from its detached CMS check; timestamp diagnostics come from the attached token check, Document Time-stamps included, and never stand in for the signature's own diagnostics

Reasons fall back to pcrrNone and native errors to zero when revocation is disabled or the corresponding CMS check is never reached. These defaults do not establish success; inspect RevocationStatus and TimeStampRevocationStatus. ValidatePadesTrustAsync preserves these fields in its completion result, and TPadesSignatureEvidence.Validation retains them for TPadesEvidenceReport.ToJson and ToCsv

The diagnostic fields are appended to the public TPadesSignatureValidation record, enlarging it. Rebuild applications and packages that exchange this record, or records containing it, against the updated units; previously compiled binaries do not share the new record layout

FPdfPdfa

procedure InjectPdfAMarkers(Source: TStream; Dest: TStream; const Options: TPdfASaveOptions);
function ValidatePdfACompliance(Source: TStream): TPdfAValidationResult;
function ValidatePdfAComplianceEx(Source: TStream; const Options: TPdfAValidationOptions): TPdfAValidationResult;
function ReadPdfAInfoFieldPresence(const PdfData: TBytes): TPdfAMetadataFields;
function ComparePdfAInfoAndXmp(const Info: TPdfAMetadataValues; Packet: TPdfXmpPacket): TPdfAMetadataReport;
function SynchronizePdfAInfoToXmp(const Info: TPdfAMetadataValues; Packet: TPdfXmpPacket): TPdfAMetadataFields;

FunctionPurpose
InjectPdfAMarkersPost-processes a saved PDF stream into a PDF/A candidate by appending XMP metadata, an sRGB or caller-supplied OutputIntent, and an updated document catalog through an incremental update; Source is read from position 0 and Dest is written from position 0; an encrypted source, an unreadable trailer or a missing catalogue raises an exception instead of copying the source through
ValidatePdfAComplianceInspects a PDF stream for PDF/A conformance markers and file-level requirements and returns the detected conformance level and validation issues; reads from position 0
ValidatePdfAComplianceExThe same read-only inspection with caller-supplied budgets for the recursive PDF/A-3 and PDF/A-4f embedded-file rules: TPdfAValidationOptions.MaxAttachmentBytes bounds the total decoded bytes of nested embedded PDF files and TPdfAValidationOptions.MaxAttachmentFiles bounds how many may be opened, whilst TPdfAValidationOptions.Default returns 64 MiB and 32 files. A tighter budget stops the recursion early and reports the affected attachment as unchecked rather than validated
ReadPdfAInfoFieldPresenceReturns the standard Info keys present in the trailer /Info dictionary of raw PDF bytes, tracking presence separately from value so an empty text string stays distinguishable from an absent entry
ComparePdfAInfoAndXmpCompares the eight ISO 19005-1 Table 1 Info-to-XMP mappings by namespace URI and RDF value type, comparing text as Unicode values and dates as UTC instants, and returns per-field equivalence evidence with the mismatch set
SynchronizePdfAInfoToXmpRewrites only the mapped XMP properties required by present Info entries and returns the corrected fields, keeping unrelated namespaces and language alternatives intact
Public typePurpose
TPdfAConformanceDetected or requested PDF/A part and conformance level
TPdfAValidationIssue, TPdfAValidationIssuesIndividual preflight findings and their set representation
TPdfANameArrayString list used by name-based validation findings
TPdfAMetadataField, TPdfAMetadataFieldsThe eight ISO 19005-1 Table 1 Info-to-XMP mappings (pamfTitle, pamfAuthor, pamfSubject, pamfKeywords, pamfCreator, pamfProducer, pamfCreationDate, pamfModDate) and their set representation
TPdfAMetadataValuesUnicode Info values Title, Author, Subject, Keywords, Creator, Producer, CreationDate and ModDate with key presence tracked by Present independently from empty text
TPdfAMetadataState, TPdfAMetadataComparison, TPdfAMetadataComparisons, TPdfAMetadataReportTyped per-field equivalence evidence with states pamsNotRequired, pamsEquivalent, pamsXmpMissing, pamsXmpTypeMismatch, pamsValueMismatch, pamsInvalidInfoDate, pamsInvalidXmpDate, per-field Field, State, InfoValue, and XmpValue, report-level HasXmpPacket, XmpParseError, MismatchFields and the Comparisons array, and aggregate status
TPdfAValidationResultConformance, the Issues set and IsCompliant result
TPdfAValidationOptionsBudgets for the recursive PDF/A-3 and PDF/A-4f embedded-file rules: MaxAttachmentBytes and MaxAttachmentFiles, with a static Default returning 64 MiB and 32 files
TPdfASaveOptionsMetadata, identifiers, ICC profile bytes in IccProfileData, output intent through OutputConditionIdentifier, OutputCondition and RegistryName (derived from the profile when left empty), and conformance settings with Default values

InjectPdfAMarkers uses sparse latest-revision lookup and bounded source copying for valid classic, xref-stream, hybrid and object-stream layouts, whilst retaining the compatibility parser for unsupported or malformed cross-reference data

The incremental revision preserves root and Info generations, source xref style, trailer identifiers, encryption refusal (which raises an exception) and Level A downgrade semantics

TPdfAMetadataComparison.IsEquivalent marks a field clean when its State is pamsNotRequired or pamsEquivalent, whilst TPdfAMetadataReport.IsEquivalent is true only when MismatchFields is empty

FPdfPdfe

procedure InjectPdfEMarkers(Source: TStream; Dest: TStream; const Options: TPdfESaveOptions);
function ValidatePdfECompliance(Source: TStream): TPdfEValidationResult;

FunctionPurpose
InjectPdfEMarkersPost-processes a saved PDF stream to attach PDF/E-1 markers: the XMP pdfe:ISO_PDFEVersion identification with its pdfaExtension:schemas description, the Info /ISO_PDFEVersion entry, an /OutputIntents entry with /S /GTS_PDFE1 and an embedded sRGB ICC profile, the trailer /ID array, the §13.5 xmpMM file identifiers, and the Info-XMP equivalence fields carried by the options
ValidatePdfEComplianceInspects a PDF stream for PDF/E-1 conformance markers and detectable file-level and content-level requirements and returns the detected conformance and validation issues; a sparse latest-revision pass runs first with a full legacy scan as fallback
Public typePurpose
TPdfEConformanceDetected or requested PDF/E conformance
TPdfEValidationIssue, TPdfEValidationIssuesPDF/E structural and content findings, including top-level AcroForm /XFA, indirect /NeedAppearances true, and the byte-level rule scans of ISO 24517-1 §6.6–§15.5 (hexadecimal-string form, implementation limits, prohibited XObjects / actions / ExtGState transfer functions, annotation flags, media and Names dictionary restrictions, the §13.4–§13.5 XMP requirements); ordinary AcroForm fields and embedded engineering assets remain permitted
TPdfEValidationResultConformance, the Issues set and IsCompliant result
TPdfESaveOptionsPDF/E Version, metadata, document identifiers and defaults

FPdfPdfr

FunctionPurpose
InjectPdfRMarkersWrites PDF/R identification and restricted catalogue and Info structures; raises an exception, rather than copying the source through, when the source trailer or catalogue cannot be read, the source is encrypted or the update cannot be written
ValidatePdfRComplianceValidates a stream with the default raster-document limits
ValidatePdfRComplianceWithOptionsValidates a stream with caller-selected resolution, geometry, strip and encryption requirements
ValidatePdfRPageFactsValidates already-collected page geometry, object counts, image characteristics and filters

Public types are TPdfRConformance, TPdfRValidationIssue, TPdfRValidationIssues, TPdfRValidationResult with its Issues set and IsCompliant result, TPdfRStringArray, TPdfRValidationOptions, TPdfRPageFacts, and TPdfRSaveOptions

TPdfRValidationOptions tunes MinimumResolutionDpi, MaximumResolutionDpi, GeometryTolerancePoints, RequireFullPageStrip and RequireEncryptedPdf20Profile; TPdfRSaveOptions carries StripInfoOptionalEntries and StripCatalogOptionalEntries to clear source Info or catalog entries that §6.4.3 or the §6.3 white list would otherwise reject; TPdfRPageFacts records PageNumber, MediaWidth, MediaHeight, the ImageLeft, ImageBottom, ImageRight and ImageTop bounds, ImageCount, TextObjectCount, PathObjectCount, FormObjectCount and ShadingObjectCount, raster geometry PixelWidth, PixelHeight, HorizontalDpi, VerticalDpi and BitsPerPixel, plus ColorSpace and the Filters chain for each page

FPdfPdfua

FunctionPurpose
InjectPdfUaMarkersAdds PDF/UA identification, language, title, MarkInfo, viewer preference and XMP markers
ValidatePdfUaComplianceValidates PDF/UA-1 or PDF/UA-2 markers and structure, optionally using original bytes for XMP checks
PdfUaIsStandardStructTypeTests a structure type name against the ISO standard set, including numbered headings
PdfReadRoleMapPairsExtracts direct or indirect RoleMap keys and values into parallel arrays
PdfUa1RoleAltTextSatisfiedTests every byte-visible /S element of a standard structure type against the ISO 14289-1 alternative-text rule, under which ActualText need only be present whilst Alt must be non-empty; returns False when no such element is visible, leaving a snapshot finding in charge

Public types are TPdfUaConformance, TPdfUaValidationIssue, TPdfUaValidationIssues, TPdfUaValidationResult with its Issues set and IsCompliant result, TPdfUaSaveOptions, and TPdfUaNameArray

The PDFium unit also exposes TPdfUaLanguageSource, TPdfUaLanguageContentKind, TPdfUaLanguageResolution, TPdfUaLanguageSpan, TPdfUaLanguageSpans, TPdfUaLanguageCoverageOptions and TPdfUaLanguageCoverageReport for bounded effective-language evidence

TPdfUaUnicodeObjectCoverage, TPdfUaUnicodeObjectCoverages, TPdfUaUnicodeCoverageOptions and TPdfUaUnicodeCoverageReport provide bounded object-scoped direct Unicode and ActualText extraction evidence

ValidatePdfUaPageContentTagging cross-checks native page-object marks against page-scoped structure MCIDs and reports both untagged real content and Artifact content exposed in the structure tree

TPdfUaSaveOptions.Default selects PDF/UA-1 defaults, whilst TPdfUaSaveOptions.PdfUa2 selects the PDF/UA-2 profile

TPdfUaSaveOptions carries DocumentTitle, Language, the Author, Subject, Keywords, Creator and Producer metadata, CreationDate and ModDate, the DocumentId and InstanceId UUIDs, the Part, Revision, Amd and Corr identifiers, and the EnsureMarkInfo and EnsureDisplayDocTitle switches to inject the required catalog entries when the source lacks them

FPdfPdfvt

procedure InjectPdfVTMarkers(Source: TStream; Dest: TStream; const Options: TPdfVTSaveOptions);
function ValidatePdfVTCompliance(Source: TStream): TPdfVTValidationResult;
function ReadPdfVTDPartEvidence(const PdfData: TBytes; out Evidence: TPdfVTDPartEvidence): Boolean;

FunctionPurpose
InjectPdfVTMarkersPost-processes a saved PDF stream into a PDF/VT-1 file by writing the inherited PDF/X-4 marker set, the pdfvtid:GTS_PDFVTVersion and GTS_PDFVTModDate properties, and a minimal DPart hierarchy when the source lacks one; PDF/VT-2 requests are normalised to PDF/VT-1
ValidatePdfVTComplianceInspects a PDF stream for PDF/VT conformance across the inherited PDF/X-4 marker set, pdfvtid properties, DPart hierarchy, and Document Part Metadata rules, with a sparse pass first and the legacy validator as fallback
ReadPdfVTDPartEvidenceExtracts bounded document-part evidence from raw PDF bytes and returns True only when a valid DPart hierarchy is present, reporting the page count, record level, and recipient record count
Public typePurpose
TPdfVTConformance, TPdfVTTrappedStatePDF/VT conformance and inherited PDF/X trapped-state selection across ptvUnspecified, ptvTrue and ptvFalse, with ptvUnspecified normalised to ptvFalse at write time
TPdfVTValidationIssue, TPdfVTValidationIssues, TPdfVTValidationResultValidation findings, the Issues set, conformance and IsCompliant result
TPdfDpmEntry, TPdfDpmEntries, TDpmTargetDocument Part Metadata entries with Name, Value and IsNestedDict, placed at the dptRoot or dptLeaf target
TPdfVTDPartEvidenceBounded document-part hierarchy and printing-condition evidence with PageCount, RecordLevel and RecipientRecordCount
TPdfVTSaveOptionsPDF/X base, ICC profile bytes in IccProfileData, output intent through OutputCondition, OutputConditionIdentifier, RegistryName and OutputIntentInfo, Trapped state, metadata, identifiers, DPart, DPM through DpmEntries placed by DpmTarget, and default settings

FPdfPdfx

procedure InjectPdfXMarkers(Source: TStream; Dest: TStream; const Options: TPdfXSaveOptions);
function ValidatePdfXCompliance(Source: TStream): TPdfXValidationResult;

FunctionPurpose
InjectPdfXMarkersPost-processes a saved PDF stream to attach PDF/X markers: the XMP pdfxid identification with its pdfaExtension:schemas description, the Info /GTS_PDFXVersion, /GTS_PDFXConformance, and /Trapped entries, a catalog /OutputIntents array with /S /GTS_PDFX and an embedded ICC profile, and the trailer /ID array
ValidatePdfXComplianceInspects a PDF stream for PDF/X conformance markers and detectable file-level and content-level requirements and returns the detected variant and validation issues; a sparse latest-revision pass runs first with a full legacy scan as fallback
Public typePurpose
TPdfXConformance, TPdfXTrappedStatePDF/X variant and Info dictionary trapped-state selection across ptUnspecified, ptTrue, ptFalse and ptUnknown, with ptUnspecified omitting the entry
TPdfXValidationIssue, TPdfXValidationIssues, TPdfXValidationResultValidation findings, the Issues set, conformance and IsCompliant result
TPdfXSaveOptionsConformance, ICC profile bytes in IccProfileData, output intent through OutputCondition, OutputConditionIdentifier, RegistryName and OutputIntentInfo, Trapped state, metadata, identifiers and defaults

Policy for RSA-PSS parameters

TPadesRsaPssParameters provides Valid, HashAlgorithmOid, MaskGenAlgorithmOid, MaskGenHashAlgorithmOid, SaltLength and TrailerField; CMS and SPKI restrictions are reported separately by TPadesSignatureAlgorithmInfo.SignaturePss and PublicKeyPss

InspectPadesSignatureAlgorithm requires CMS PSS parameters but accepts an empty SEQUENCE using RFC defaults; it refuses malformed DER, duplicate or out-of-order explicit fields, unsupported integer encodings and oversized parameter blocks

EvaluatePadesSignatureAlgorithm checks that the CMS digest agrees with the PSS hash; a PSS-only key refuses PKCS #1 v1.5, and restricted keys require matching hash, MGF hash and trailer plus a signature salt no shorter than the key minimum

Another supported MGF1 hash may be valid; unknown algorithms are Unsupported, weak MGF hashes Indeterminate and broken hashes Invalid

Parameter blocks cannot exceed 16 KiB, and salt/trailer values must be nonnegative 32-bit integers; this structural policy adds to the crypto backend checks but establishes neither RSA key strength nor EMSA-PSS signature validity

When assembling algorithm evidence yourself, set SignaturePss and SignatureParametersPresent; the PSS OID alone is insufficient

Related API

The TPdf.SaveAsPdfA, SaveAsPdfE, SaveAsPdfR, SaveAsPdfUa, SaveAsPdfVT, SaveAsPdfX and PAdES methods provide document-instance wrappers around these units

Integer implementation-limit checks read lexical PDF tokens, leaving out comments, literal and hexadecimal strings, names and real numbers; signed 32-bit boundaries and leading zeros are handled with no integer overflow