Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Controlling Size of Published PDF
Author Message
Anonymous
# Posted: 11 Jan 2006 17:54


Hi,

I've been working with the PDF control and everything has been working fine so far, however I have gotten some complaints about the size of the PDF that we output.

Is there any way for me to decrease the size of the PDF file created? I.e. Decrease the quality settings or increase the compression?

I've tried playing around with the PDF's JPEGQuality and Compression members but changing those values never seems to affect the output size. Any ideas?

Stanislav
# Posted: 11 Jan 2006 18:41


Hello,

Library doesn't recompress jpeg files, so if you want to decrease size of the PDF, you should provide smaller jpeg. PDF.Compression affects only page streams and other page objects, not images.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Anonymous
# Posted: 11 Jan 2006 19:01


Hi Stanislav,

Thanks for the quick reply!

I think I should have posted more information in my previous post, basically we are creating a multi-page PDFs by adding PDF pages and then drawing directly to each pages HDC.

The reason that I mentioned the JPEGQuality is simply because it was one of the two options that I saw that seemed to deal directly with output size. We are not attaching any JPEGS to the PDF.

Now that you know how we are creating our PDFs is their any way for us to control the output size? Is there anyway for us to control the PDF quality?

Thanks!

Stanislav
# Posted: 11 Jan 2006 19:15


Hello,

No, you can't decrease quality - it is controlled by library and cannot be changed because of Adobe PDF standard. You can decrease size of the embedded images by using JPEGQuality and you can compress page streams by using PDF.Compression property. There are no other ways to decrease size of the PDF.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Anonymous
# Posted: 11 Jan 2006 21:23


Hmm thanks again Stanislav,

I tried changing the PDF.Compression but both neither ctNone nor ctFlate seemed to have any affect on the output size? Is this because I am drawing directly to the HDC?

Do you think I could decrease the size of the PDF by using embedded images for my pages instead of drawing directly to the HDC?

Also do you have any idea as to what effect the final PDF size?

Anonymous
# Posted: 16 Jan 2006 18:04


We've encountered the same problem and recommend using embedded images.

If you draw images directly to the HDC there are several things you have to think about.

1. There are no way for PDF Creator to know if you are using the same picture several times. I.e. if you have a logo as a page header and print 200 pages. This picture data will be stored 200 times in the PDF.

2. Since the picture data is raw data there is a possibiilty that the picture is many times larger than the original. Especially when you scale pictures (resize or scale to match a larger DPI). It can be as bad as several Mb.

The best way to reduce the size is to use embedded images. Then the pictures are stored in their original size (and compression) and the scaling is taken care of in the PDF-browser. Also the pictures are stored only once.

Hope this is helpful!

Stanislav
# Posted: 20 Jan 2006 14:35


Hello,

Yes, i agree with previous post.

Thank you very much !

Best regards,
Stanislav
Two Pilots

star
# Posted: 16 Jan 2008 12:04


I too have a couple large PDF files that need to be reduced in size. However I'm not as advanced as you and need help in understanding terms and possibly a step by step procedure.

What is HDC? How do you use imbeddged images? Basically, where do I start?

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.014

 

Page top