THotPDF.UseXRefStream Property

 

THotPDF.UseXRefStream

THotPDF

 

الأعلى  السابق  التالي

Emit a PDF 1.5 /Type /XRef cross-reference stream (ISO 32000-1 7.5.8) instead of the textual xref ... trailer sequence.

 

Delphi syntax:

property UseXRefStream: Boolean;

 

C++ syntax:

__property bool UseXRefStream;

 

الوصف

عندما يكون UseXRefStream true، يكتب EndDoc كائن stream غير مباشر واحدًا من نوع /Type /XRef بدل جدول xref النصي القديم مع trailer وstartxref. تستخدم entries ‏/W [1 4 2] ويضغط الجدول كله بـ FlateDecode، مما يخفض overhead xref عادة 4-10 مرات في المستندات الكبيرة

 

تعد XRef streams شرطًا لازمًا لميزة UseObjectStreams: وحده xref stream الثنائي يستطيع ترميز type-2 compressed-object entries التي تشير إلى حاويات /Type /ObjStm. إيقاف UseXRefStream يعطل UseObjectStreams تلقائيًا وقت الحفظ

 

القيمة الافتراضية: false، أي opt-in. يحافظ ذلك على جدول xref النصي للأدوات التي تفترض keyword ‏xref ولأقصى توافق مع قارئات PDF 1.4 والأقدم

ضبط UseXRefStream على true في مستند Version فيه أقل من PDF 1.5 يتم تجاهله بصمت وقت الحفظ ويصدر xref النصي بدلًا من ذلك

 

Code Example

HPDF := THotPDF.Create( nil );
try
  HPDF.FileName := 'c:\Output.pdf';
  HPDF.Version := pdf15;          // Required for XRef streams
  HPDF.UseXRefStream := true;     // Emit /Type /XRef instead of xref table
  HPDF.UseObjectStreams := true;  // Optional: also pack objects into /Type /ObjStm
  HPDF.Compression := cmFlateDecode;
  HPDF.BeginDoc;
  HPDF.CurrentPage.TextOut( 100, 100, 0, 'Compact PDF 1.5 output' );
  HPDF.EndDoc;
finally
  HPDF.Free;
end;

 

انظر أيضا

UseObjectStreams, Compression, Version, PDF Filter Support