Resizing PDF's

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
stupidname
Posts: 4
Joined: 2016-01-27T08:23:46-07:00
Authentication code: 1151

Resizing PDF's

Post by stupidname »

hi,

Background: we originally started scanning documents using a MFP at 600 DPI to ensure the validity of the document of kept 100% or close to.

Issue: I have a task to start reducing these PDFs close 5 MB whilst keeping the resolution/image/clarity/information.

I've asked a fellow colleague to help and we've come with this script, as there are many folders:

Code: Select all

for file in *.pdf; do
   convert -density 400 "$file" "`echo $file | sed 's/\.pdf$/\.jpg/'`"
done
Problem is i can't get the size low enough with distorting the image - is there a better way?


Many thanks.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing PDF's

Post by snibgo »

What is the format of the images within the PDF? Are there any vector graphics, or is it a simple one page = one image? What is the compression ratio?
snibgo's IM pages: im.snibgo.com
stupidname
Posts: 4
Joined: 2016-01-27T08:23:46-07:00
Authentication code: 1151

Re: Resizing PDF's

Post by stupidname »

Apologies for the lack of info.

There are two dcoument options the MFP can produce: TIFFs and PDFs - It must convert the tiff to PDF or straight to PDF, im not quote sure on this one.

The PDFs contain multiple documents which can vary per file, some may be one to one or more than likely one to many - possible 100 pages+.

The only images that are contained in the PDFs are company logos on headers of letters/documents or full page landscape pictures of homes/property's.

Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing PDF's

Post by snibgo »

So your PDFs are mostly text? ImageMagick is a raster processor. It converts PDF documents to raster format, ie pixels. So using IM for this task seems a bad idea (depending on the purpose).
snibgo's IM pages: im.snibgo.com
stupidname
Posts: 4
Joined: 2016-01-27T08:23:46-07:00
Authentication code: 1151

Re: Resizing PDF's

Post by stupidname »

The PDF's are mostly text. The goal is to reduce the PDF size. Is a recommended method/product for this?


Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing PDF's

Post by snibgo »

I don't know of one. Perhaps a general-purpose file compresser will do the trick.
snibgo's IM pages: im.snibgo.com
stupidname
Posts: 4
Joined: 2016-01-27T08:23:46-07:00
Authentication code: 1151

Re: Resizing PDF's

Post by stupidname »

Thanks for your time and help.
Post Reply