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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to compress PDFs

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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');


Nigel
Xequte Software
www.imageen.com