THotPDF.Compression Property

 

THotPDF.Compression

THotPDF

 

למעלה  הקודם  הבא

Determines the PDF file compression.

 

type

THPDFCompressionMethod = (cmNone, cmFlateDecode);

 

Delphi syntax:

property Compression: THPDFCompressionMethod;

 

C++ syntax:

__property THPDFCompressionMethod Compression;

 

תיאור

השתמש ב-Compression כדי לקרוא או להגדיר דחיסת קובץ PDF. ‏Compression הוא אחד מהערכים הבאים:

 

Value                Meaning


cmNone                PDF file not compressed.

cmFlateDecode        PDF file encoded using the deflate compression method.

 

Stacking further size reductions

Compression שולט בקידוד FlateDecode של streams של page content, fonts ו-images, וגם בוחר את מאמץ ה-Flate עבור המכולות המבניות: stream ה-cross-reference ש-UseXRefStream פולט ומכולות /Type /ObjStm ש-UseObjectStreams פולט (ISO 32000-1 7.5.7). UseXRefStream מחליף את טבלת ה-cross-reference הטקסטואלית ב-stream דחוס /Type /XRef שהתוכן שלו עם חיזוי PNG-Up (/Predictor 12) ושהחורים של רשימתו החופשית מתכווצים לתת-מקטעי /Index. מסמכים מרובי עמודים אמיתיים מקבלים בדרך כלל הקטנת גודל נוספת של 20-40% מעבר לזרמים דחוסים ב-FlateDecode

 

Code Example

HPDF := THotPDF.Create( nil );
try
  HPDF.FileName := 'c:\Output.pdf';
  HPDF.BeginDoc;                     // Start PDF document creation
  HPDF.CurrentPage.TextOut( 100, 100, 0, 'Hello World!' );
  HPDF.EndDoc;                       // Finish and save PDF document
finally
  HPDF.Free;
end;