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
FPdfPdfCommon| Function | Purpose |
|---|---|
AnsiCountDictKeyTokens | Counts one decoded name key at the top level of a raw PDF dictionary whilst skipping nested values, strings and comments |
TPdfParserResourceBudget | Defines process-wide recursion, token, object, decoded-byte, expansion-ratio, allocation and deadline limits; Default returns the library defaults |
ConfigurePdfParserResourceBudget | Validates and atomically replaces the process policy used by later custom parser operations |
GetPdfParserResourceBudget | Returns a thread-safe value snapshot of the current process policy |
ResetPdfParserResourceBudget | Restores the default process policy |
PdfParserStartTick, PdfParserDeadlineReached | Provide wrap-safe deadline checkpoints for custom parser implementations |
FPdfAssocFilesprocedure InjectAssociateFiles(Source: TStream; Dest: TStream; const Options: TAssocFilesOptions);
| Public type | Purpose |
|---|---|
TPdfAFRelationship | ISO 32000-2 AFRelationship values afSource, afData, afAlternative, afSupplement, afUnspecified, afEncryptedPayload, afFormData and afTemplate, including the PDF 2.0 additions |
TAssociateFile | One associated file with FileName, Description, payload Content, Relationship and optional MIMEType |
TAssocFilesOptions | Associated-file Files list and catalog or page TargetPage, with defaults from TAssocFilesOptions.Default |
EPdfAssocFilesError | Raised 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| Function | Purpose |
|---|---|
InjectPadesDssMarkers | Adds DSS certificate, OCSP, CRL and VRI material through an incremental update |
RenewPadesArchiveTimestamp | Appends a document timestamp and reports the resulting archive level and timestamp metadata |
ValidatePadesCompliance, ValidatePadesTrust | Validate top-level signature-entry cardinality, exact ByteRange and Contents-token exclusion, cryptographic integrity, trust, revocation and timestamp evidence |
AnalyzePadesSignatureRevisions | Classifies later revisions, object changes, FieldMDP effects and modification risks |
BuildPadesEvidenceReport, BuildPadesEvidenceReportBytes | Build bounded multi-signature evidence from a stream or an existing immutable source-byte capture |
EvaluatePadesSignatureAlgorithm, InspectPadesSignatureAlgorithm | Inspect 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 |
VerifyCmsAlgorithmProtection | Checks the CMS algorithm-protection signed attribute against the signer digest and signature algorithms |
SignPadesBytes | Appends a local PAdES signature with optional RFC 3161 timestamping |
PreparePadesRemoteSignature, CompletePadesRemoteSignature | Prepare and complete a bound fixed-width remote-signing placeholder workflow |
SavePadesRemoteSigningRequest, LoadPadesRemoteSigningRequest | Persist or restore the request metadata required to complete remote signing |
| Area | Types |
|---|---|
| Levels and validation | TPadesLevel (plUnknown, plNone, plB_B, plB_T, plB_LT, plB_LTA), TPadesValidationIssue, TPadesValidationIssues, TPadesValidationSourceStatus (pvssUnavailable, pvssOriginalBytes, pvssIncomplete), TPadesValidationResult |
| Cryptography | TPadesCryptoStatus (pcsNotChecked, pcsValid, pcsInvalid, pcsUnsupported, pcsIndeterminate), TPadesSignatureAlgorithmFamily (psafUnknown, psafRsa, psafEcdsa, psafEd25519, psafEd448), TPadesSignatureAlgorithmInfo, TPadesSignatureValidation, TPadesSignatureValidations |
| Trust validation | TPadesTrustNetworkPolicy (ptnpOffline, ptnpOnline), TPadesTrustValidationStage, TPadesTrustValidationProgress, TPadesTrustValidationProgressEvent, TPadesTrustValidationOptions, TPadesTrustValidationAsyncStatus, TPadesTrustValidationCompletion, TPadesTrustValidationReply |
| Revision analysis | TPadesRevisionAnalysisStatus (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 reports | TPadesHashStrings, TPadesObjectNumbers, TPadesEvidenceReportOptions, TPadesEvidenceMaterialKind, TPadesValidationMaterialEvidence, TPadesValidationMaterialEvidences, TPadesVriEvidence, TPadesVriEvidences, TPadesSignatureEvidence, TPadesSignatureEvidences, TPadesEvidenceReport |
| DSS and archive timestamps | TPadesDssMaterial, TPadesDssMaterials, TPadesDssIndexes, TPadesDssVri, TPadesDssVris, TPadesDssOptions, TPadesArchiveTimestampOptions, TPadesArchiveTimestampReport |
| Signing | TPadesSeedValueConstraint, 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 and FieldOptions; TPadesRemoteSigningRequest binds FormatVersion, PreparedFingerprint, DocumentDigest, ByteRange, ContentsHexOffset and ContentsSize
TPadesTrustValidationOptions.QualifiedValidationTime selects the trusted-list service-history evaluation time, with zero selecting the current time
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
FPdfPdfaprocedure InjectPdfAMarkers(Source: TStream; Dest: TStream; const Options: TPdfASaveOptions);
function ValidatePdfACompliance(Source: TStream): TPdfAValidationResult;
function ReadPdfAInfoFieldPresence(const PdfData: TBytes): TPdfAMetadataFields;
function ComparePdfAInfoAndXmp(const Info: TPdfAMetadataValues; Packet: TPdfXmpPacket): TPdfAMetadataReport;
function SynchronizePdfAInfoToXmp(const Info: TPdfAMetadataValues; Packet: TPdfXmpPacket): TPdfAMetadataFields;
| Public type | Purpose |
|---|---|
TPdfAConformance | Detected or requested PDF/A part and conformance level |
TPdfAValidationIssue, TPdfAValidationIssues | Individual preflight findings and their set representation |
TPdfANameArray | String list used by name-based validation findings |
TPdfAMetadataField, TPdfAMetadataFields | The eight ISO 19005-1 Table 1 Info-to-XMP mappings (pamfTitle, pamfAuthor, pamfSubject, pamfKeywords, pamfCreator, pamfProducer, pamfCreationDate, pamfModDate) and their set representation |
TPdfAMetadataValues | Unicode Info values Title, Author, Subject, Keywords, Creator, Producer, CreationDate and ModDate with key presence tracked by Present independently from empty text |
TPdfAMetadataState, TPdfAMetadataComparison, TPdfAMetadataComparisons, TPdfAMetadataReport | Typed 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 |
TPdfAValidationResult | Conformance, the Issues set and IsCompliant result |
TPdfASaveOptions | Metadata, identifiers, ICC profile bytes in IccProfileData, output intent 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 behaviour, and Level A downgrade semantics
FPdfPdfeprocedure InjectPdfEMarkers(Source: TStream; Dest: TStream; const Options: TPdfESaveOptions);
function ValidatePdfECompliance(Source: TStream): TPdfEValidationResult;
| Public type | Purpose |
|---|---|
TPdfEConformance | Detected or requested PDF/E conformance |
TPdfEValidationIssue, TPdfEValidationIssues | PDF/E structural and content findings, including top-level AcroForm /XFA and indirect /NeedAppearances true; ordinary AcroForm fields and embedded engineering assets remain permitted |
TPdfEValidationResult | Conformance, the Issues set and IsCompliant result |
TPdfESaveOptions | PDF/E Version, metadata, document identifiers and defaults |
FPdfPdfr| Function | Purpose |
|---|---|
InjectPdfRMarkers | Writes PDF/R identification and restricted catalog and Info structures |
ValidatePdfRCompliance | Validates a stream with the default raster-document limits |
ValidatePdfRComplianceWithOptions | Validates a stream with caller-selected resolution, geometry, strip and encryption requirements |
ValidatePdfRPageFacts | Validates 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| Function | Purpose |
|---|---|
InjectPdfUaMarkers | Adds PDF/UA identification, language, title, MarkInfo, viewer preference and XMP markers |
ValidatePdfUaCompliance | Validates PDF/UA-1 or PDF/UA-2 markers and structure, optionally using original bytes for XMP checks |
PdfUaIsStandardStructType | Tests a structure type name against the ISO standard set, including numbered headings |
PdfReadRoleMapPairs | Extracts direct or indirect RoleMap keys and values into parallel arrays |
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
FPdfPdfvtprocedure InjectPdfVTMarkers(Source: TStream; Dest: TStream; const Options: TPdfVTSaveOptions);
function ValidatePdfVTCompliance(Source: TStream): TPdfVTValidationResult;
function ReadPdfVTDPartEvidence(Source: TStream): TPdfVTDPartEvidence;
| Public type | Purpose |
|---|---|
TPdfVTConformance, TPdfVTTrappedState | PDF/VT conformance and inherited PDF/X trapped-state selection across ptvUnspecified, ptvTrue and ptvFalse, with ptvUnspecified normalised to ptvFalse at write time |
TPdfVTValidationIssue, TPdfVTValidationIssues, TPdfVTValidationResult | Validation findings, the Issues set, conformance and IsCompliant result |
TPdfDpmEntry, TPdfDpmEntries, TDpmTarget | Document Part Metadata entries with Name, Value and IsNestedDict, placed at the dptRoot or dptLeaf target |
TPdfVTDPartEvidence | Bounded document-part hierarchy and printing-condition evidence with PageCount, RecordLevel and RecipientRecordCount |
TPdfVTSaveOptions | PDF/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 |
FPdfPdfxprocedure InjectPdfXMarkers(Source: TStream; Dest: TStream; const Options: TPdfXSaveOptions);
function ValidatePdfXCompliance(Source: TStream): TPdfXValidationResult;
| Public type | Purpose |
|---|---|
TPdfXConformance, TPdfXTrappedState | PDF/X variant and Info dictionary trapped-state selection across ptUnspecified, ptTrue, ptFalse and ptUnknown, with ptUnspecified omitting the entry |
TPdfXValidationIssue, TPdfXValidationIssues, TPdfXValidationResult | Validation findings, the Issues set, conformance and IsCompliant result |
TPdfXSaveOptions | Conformance, ICC profile bytes in IccProfileData, output intent through OutputCondition, OutputConditionIdentifier, RegistryName and OutputIntentInfo, Trapped state, metadata, identifiers and defaults |
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
The TPdf.SaveAsPdfA, SaveAsPdfE, SaveAsPdfR, SaveAsPdfUa, SaveAsPdfVT, SaveAsPdfX and PAdES methods provide document-instance wrappers around these units