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;
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
| Limit | Default | Purpose |
|---|---|---|
MaxProfileBytes | 64 MiB | Stopt het parsen en hashen van te grote profielen |
MaxTagCount | 4096 | Begrenst het doorlopen van de tagtabel |
TPdfIccProfileInfo.IsValid is alleen True wanneer de probleemenset leeg is