ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to compress PDFs
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

zerob

111 Posts

Posted - Feb 13 2023 :  12:22:54  Show Profile  Reply
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

xequte

38222 Posts

Posted - Feb 13 2023 :  16:46:58  Show Profile  Reply
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');


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: