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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Compressings/Compacting PDFs
  FAQ FAQ  Forum Search   Register Register  Login Login

Compressings/Compacting PDFs

 Post Reply Post Reply
Author
Message
BobW View Drop Down
Senior Member
Senior Member


Joined: 27 Feb 13
Location: Minnesota
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobW Quote  Post ReplyReply Direct Link To This Post Topic: Compressings/Compacting PDFs
    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
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 27 Apr 15 at 2:01PM
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
Back to Top
erico View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24 Sep 14
Location: Minnesota USA
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote erico Quote  Post ReplyReply Direct Link To This Post Posted: 27 Apr 15 at 3:53PM
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
Back to Top
BobW View Drop Down
Senior Member
Senior Member


Joined: 27 Feb 13
Location: Minnesota
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobW Quote  Post ReplyReply Direct Link To This Post Posted: 28 Apr 15 at 11:10PM
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.
Back to Top
erico View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24 Sep 14
Location: Minnesota USA
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote erico Quote  Post ReplyReply Direct Link To This Post Posted: 29 Apr 15 at 3:36PM
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
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 06 May 15 at 7:50AM
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store