רקורד THPDFRenderDocAccess

קושר את ה-renderer אל שירותי המסמך לפתרון הפניות, קריאת streams, פענוח תמונות, איתור גופנים והערכת נראות שכבות

הצהרה

THPDFRenderDocAccess= record
  Context: Pointer;
  SharedCache: THPDFRendererSharedCache;
  ShareRenderCaches: boolean;
  // v2.375.0 generic indirect-ref resolver (any object type). The typed
  // Resolve* fields below predate it and return nil for non-matching
  // types, which silently dropped indirect refs to arrays (e.g. a
  // /ColorSpace entry pointing at a [/Separation ...] array object)
  ResolveObject: function(Context: Pointer; Obj: THPDFObject): THPDFObject;
  ResolveDictionary: function(Context: Pointer; Obj: THPDFObject): THPDFDictionaryObject;
  ResolveStream: function(Context: Pointer; Obj: THPDFObject): THPDFStreamObject;
  ReadDecodedStreamBytes: function(Context: Pointer; Stream: THPDFStreamObject; out Bytes: TBytes): boolean;
  AcquireDecodedImageStream: function(Context: Pointer;
    Stream: THPDFStreamObject): IHPDFDecodedBitmapHandle;
  DecodeImageStream: function(Context: Pointer; Stream: THPDFStreamObject): TBitmap;
  BeginProgressiveImageDecode: function(Context: Pointer;
    Stream: THPDFStreamObject;
    CancellationToken: THPDFCancellationToken): IHPDFProgressiveImageDecoder;
  DecodeImageRegion: function(Context: Pointer; Stream: THPDFStreamObject;
    RegionLeft, RegionTop, RegionRight, RegionBottom,
    DesiredWidth, DesiredHeight: Integer): TBitmap;
  AcquireDecodedImageRegion: function(Context: Pointer;
    Stream: THPDFStreamObject; RegionLeft, RegionTop, RegionRight,
    RegionBottom, DesiredWidth,
    DesiredHeight: Integer): IHPDFDecodedBitmapHandle;
  // v2.425.0 inline-image decoder: builds a throwaway stream from the raw
  // ID..EI bytes and the normalised BI key set, then decodes it without the
  // ObjectNumber-keyed cache (inline images have no object number). Returns
  // a TBitmap the caller owns, or nil on failure. Nil hook = inline images
  // are not rendered (legacy behaviour)
  DecodeInlineImage: function(Context: Pointer; const Bytes: TBytes;
    const Keys: THPDFInlineImgKeys): TBitmap;
  // Colour-key /Mask array of an image XObject as a soft mask, white where
  // the image shows and black where it is masked out. Returns a TBitmap the
  // caller owns, or nil when the image has no usable colour-key mask; a nil
  // hook draws such images unmasked
  DecodeColorKeyMask: function(Context: Pointer;
    Stream: THPDFStreamObject): TBitmap;
  // Look up a font dictionary by resource key in a Resources dict, following
  // indirect refs at both /Resources and /Font levels. Returns nil if absent
  ResolveFontDict: function(Context: Pointer; PageObj: THPDFDictionaryObject;
    const FontKey: AnsiString): THPDFDictionaryObject;
  // v2.377.0 optional-content visibility oracle: evaluates an /OC property
  // object (OCG or OCMD) against the document's layer states. Nil hook or
  // a True result means the content is drawn
  EvalOCVisibility: function(Context: Pointer; PropObj: THPDFObject): boolean;
  CancellationToken: THPDFCancellationToken;
  ColourIntent: Integer;
  FallbackPolicy: THPDFRenderFallbackPolicy;
  FallbackDiagnosticLimit: Integer;
  OverprintPreview: boolean;
  ProofICCProfile: TBytes;
  OutputICCProfile: TBytes;
  BlackPointCompensation: boolean;
  SeparationPlate: AnsiString;
end;

יחידה

HPDFPageRenderer

שדות

שדהמטרה
Contextמצביע context שהקורא מספק ומועבר כארגומנט הראשון של כל callback; המסמך קושר את עצמו כאן
SharedCacheמטמון renderer שכמה עמודים יכולים לשתף כש-‏ShareRenderCaches‏ מופעל
ShareRenderCachesTrue כשהמסמך מאפשר ל-renderers מקבילים לשתף מטמוני פענוח
ResolveObjectמפענח הפניות-עקיפות גנרי לכל סוג אובייקט; נוסף כי המפענחים הטיפוסיים מחזירים nil לטיפוסים שאינם תואמים
ResolveDictionaryמפענח הפניה עקיפה אל אובייקט מילון, ‏nil לטיפוסים אחרים
ResolveStreamמפענח הפניה עקיפה אל אובייקט stream
ReadDecodedStreamBytesקורא stream מפוענח במלואו אל מערך בתים
AcquireDecodedImageStreamמפענח XObject תמונה אל handle bitmap משותף עם ספירת הפניות
DecodeImageStreamמפענח XObject תמונה אל bitmap בבעלות הקורא
BeginProgressiveImageDecodeמתחיל מפענח פרוגרסיבי ניתן-לביטול עבור stream תמונה גדול
DecodeImageRegionמפענח תת-אזור של תמונה בגודל פיקסלים מבוקש
AcquireDecodedImageRegionוריאנט האזור שמחזיר handle bitmap משותף עם ספירת הפניות
DecodeInlineImageמפענח תמונת inline מבתי ה-‏ID..EI‏ הגלמיים ומקבוצת המפתחות המנורמלת של ה-BI, תוך עקיפת מטמון מספרי-האובייקטים; hook‏ nil אומר שתמונות inline אינן מרונדרות
DecodeColorKeyMaskTurns the color-key /Mask array of an image XObject into a white-and-black soft mask the size of the image; nil when the image has no usable color-key mask, and a nil hook draws such images unmasked
ResolveFontDictמאתר מילון גופן לפי מפתח משאב, תוך מעקב אחרי הפניות עקיפות ברמות ה-‏/Resources‏ וה-‏/Font;‏ ‏nil כשנעדר
EvalOCVisibilityמעריך אובייקט מאפיין ‏/OC‏ מול מצבי השכבות של המסמך; hook‏ nil או תוצאה True אומרים שהתוכן מצויר
CancellationTokentoken ביטול שנבדק בזמן פעולות פענוח ארוכות
ColourIntentכוונת טיפול בצבע שמוחלת על מצב הגרפיקה המרונדר
FallbackPolicyבוחר אם יכולות לא נתמכות מוזנחות, מדווחות או מתייחסות ככישלונות מחמירים
FallbackDiagnosticLimitתקרה על מספר הודעות האבחון שנאספות בזמן fallback
OverprintPreviewמפעיל סימולציית preview של overprint
ProofICCProfileבתי פרופיל ICC לצד ה-proofing של pipeline הצבע
OutputICCProfileבתי פרופיל ICC שמתארים את התקן הפלט
BlackPointCompensationמפעיל פיצוי נקודה שחורה בטרנספורמציה של ICC
SeparationPlateשם לוח ההפרדה לבידוד; ריק מרנדר רגיל

הערות שימוש

ממשקי API קשורים