Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
zerob
Posted - Feb 13 2023 : 12:22:54 Hi How to i enable PDF compression? I know of this setting for images: ImageEnIO1.Params.PDF_Compression := ioPDF_JPEG
But i mean the compression of the whole PDF... text, commands and so on. Right now the PDF is saved in plain text... And also, is there a way to specify more parameters for the jpeg compression? Like Quality 1-100?
Thanks
1 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Feb 13 2023 : 16:46:58 Hi
Compression only applies to images in the PDF document, not the document as a whole.
You can use the JPEG_* properties to configure the compression level:
// Convert full color PNG to PDF
ImageEnView1.IO.LoadFromFile('D:\input.png');
ImageEnView1.IO.Params.PDF_PaperSize := iepA4;
ImageEnView1.IO.Params.PDF_Compression := ioPDF_Jpeg;
ImageEnView1.IO.Params.JPEG_Quality := 90;
ImageEnView1.IO.Write('D:\out.pdf');