Re: Flattening PDF Files at the UNIX Command Line

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Thu Mar 10 2011 - 09:12:53 MST

Here are a couple of approaches you might try; these utils are commonly available on most linux platforms:

1. Imagemagick's convert:

    convert orig.pdf flattened.pdf

However, image quality suffers.

2. pdf2ps orig.pdf - | ps2pdf - flattened.pdf

This retains the image quality, and on my test example, reduced a 768K pdf down to 155K.

Hope that helps...
Rick

On Mar 10, 2011, at 8:35 AM, Capehart, William J wrote:

> Hi All
>
> We are generating ncl generated PDF Files that need to be pushed to a user via unix mail. We're doing all of this in scripts at the command line. Is there a unix program (command line once again) that will "flatten" a PDF? NCL makes nice pdf graphics but they can be a bit husky.
>
> Thankymuch
> Bill Capehart
> IAS/SDSMT
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 10 09:13:00 2011

This archive was generated by hypermail 2.1.8 : Thu Mar 10 2011 - 21:44:37 MST