Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Compressings/Compacting PDFs |
Post Reply ![]() |
Author | |
BobW ![]() Senior Member ![]() Joined: 27 Feb 13 Location: Minnesota Status: Offline Points: 64 |
![]() ![]() ![]() ![]() ![]() Posted: 24 Apr 15 at 10:56PM |
I had a request recently to shrink a couple of PDFs. I created some of them. Others were created by some other process. Other than TransformFile, I can't think of any feature that will take a PDF and make it smaller. I did find a website called smallpdf [dot] com that lets you select a PDF then download the smaller version. I ran a couple of them through it and they did come back quite a bit smaller. We're now examining them to see if the quality is acceptable. I would love to do something like this myself and I know I'm going to be asked to. Is there a method or feature I'm missing?
Bob |
|
![]() |
|
mLipok ![]() Senior Member ![]() ![]() Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 453 |
![]() ![]() ![]() ![]() ![]() |
1. How many pages contain test document ? 2. What was the initial size of the PDF (in KB) ? 3. What was the size after using this specified page ? 4. Did you try: Option 10 in ReplaceFonts - Removes embedded fonts if it matches the 14 std fonts
|
|
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600 |
|
![]() |
|
erico ![]() Senior Member ![]() ![]() Joined: 24 Sep 14 Location: Minnesota USA Status: Offline Points: 51 |
![]() ![]() ![]() ![]() ![]() |
TransformFile() may reduce the size of PDFs.
CompressContent(), CompressImages(), CompressFonts() may also help edit: corrected typo Edited by erico - 27 Apr 15 at 3:54PM |
|
Eric O
|
|
![]() |
|
BobW ![]() Senior Member ![]() Joined: 27 Feb 13 Location: Minnesota Status: Offline Points: 64 |
![]() ![]() ![]() ![]() ![]() |
I've tried the following in a quick program:
TransformFile LoadFromFile ReplaceFonts(10) CompressContent() CompressImages(1) CompressFonts() SaveToFile Description Original Size My Program SmallPDF[dot]Com result 2 page IRS form 289K 278K 99K Single page 1,128K 1,142K 558K scanned image (made by putting a form on a copier that emailed me the PDF) 1 Page PDF I 116K 120K 26K created with QuickPDF In two cases the resulting file is LARGER than the original! I tried using each of the functions individually -- TransformFile by itself got the first PDF down to 267K, but none of them really did much at all. This is going to be a bit of a problem for me because I know I'm going to be asked why I can't do what the free website did. |
|
![]() |
|
erico ![]() Senior Member ![]() ![]() Joined: 24 Sep 14 Location: Minnesota USA Status: Offline Points: 51 |
![]() ![]() ![]() ![]() ![]() |
The size of the scanned image is most closely tied to the dpi resolution of the scanned image. Your best chance there would be to use a lower resolution using SetImageResolution and FitImage as required.
For the other two, without looking at the content, there is really no way to be certain what is increasing the PDF size. It could be almost anything. |
|
Eric O
|
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Bob,
Most programs that reduce PDF file sizes concentrate on re-sampling and re-compressing images within the PDF. This is usually achieved by reducing the colours in the image, using a different image compression such as lossy JPEG and also lowering the DPI by resampling the image. I don't believe that SetImageResolution will be much use. To get this working with Debenu Quick PDF Library you will need to extract the larger images, process them to reduce their size and then use something like ReplaceImage to update the image. I suspect this is a feature currently on the Debenu TODO list. Other optimisations may include removing unused character from fonts and then re-compressing them or removing unused objects. Each of these processes is quite complex and time consuming. Andrew
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store