PDFium Component Docs

FPdfIccProfile unit

Unit: FPdfIccProfile
Begrensde inspectie van ICC-profielheader en tagtabel voor standaardenvalidatie en productiebewijs

Syntax

TPdfIccProfileLimits = record
  MaxProfileBytes: Int64;
  MaxTagCount: Integer;
  class function Default: TPdfIccProfileLimits; static;
end;

TPdfIccProfileIssue = (ipiTooLarge, ipiHeaderTruncated, ipiSizeMismatch, ipiSignatureInvalid, ipiUnsupportedColorSpace, ipiTagCountExceeded, ipiTagTableTruncated, ipiTagDataOutOfBounds);
TPdfIccProfileIssues = set of TPdfIccProfileIssue;

TPdfIccProfileInfo = record
  Issues: TPdfIccProfileIssues;
  ByteSize: Int64;
  DeclaredSize: Int64;
  Version: string;
  VersionBytes: AnsiString;
  DeviceClass: string;
  DataColorSpace: string;
  DataColorSpaceSignature: AnsiString;
  Pcs: string;
  ComponentCount: Integer;
  TagCount: Integer;
  Md5: string;
  Sha256: string;
  ProfileId: string;
  ProfileDescription: string;
  function IsValid: Boolean;
end;

function InspectPdfIccProfile(const Data: TBytes): TPdfIccProfileInfo;
function InspectPdfIccProfile(const Data: TBytes;
  const Limits: TPdfIccProfileLimits): TPdfIccProfileInfo;
function PdfIccProfileDescriptionMatches(const Data: TBytes;
  const Expected: string): Boolean;

Description

InspectPdfIccProfile valideert de 128-byte header, de opgegeven bestandsgrootte, de acsp-signatuur, het kleurruimtecomponentenaantal, het begrensde tagaantal, de omvang van de tagtabel en elk tagdatabereik voordat metadata wordt blootgesteld

Het resultaat omvat de ruwe vier-byte versie- en kleurruimtesignaturen, weergavewaarden, componenten- en tagaantallen, profiel-ID, MD5 van het volledige bestand, SHA-256, device class, PCS en de eerste geldige profielbeschrijving

GRAY-, RGB-, CMYK- en de signaturen 2CLR tot en met FCLR worden door de algemene inspector herkend; formatspecifieke validators kunnen een nauwer proceskleurbeleid hanteren

PdfIccProfileDescriptionMatches controleert de v2 desc-waarde of elke begrensde locale-record in een v4 mluc profileDescriptionTag

Limits

LimitDefaultPurpose
MaxProfileBytes64 MiBStopt het parsen en hashen van te grote profielen
MaxTagCount4096Begrenst het doorlopen van de tagtabel

Remarks

See Also

FPdfPdfvtMime