Re: reducing PDF file size in Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 27 Dec 2012 10:41:17 -0500 Bill Davidsen <davidsen@xxxxxxx>
wrote:

> agraham wrote:
> > Assuming you have source file(s) that are not already PDF, use Open Office and
> > export it as PDF at which point you have all the scaling/compression options
> > available.
> >
> The way to get a smaller file is not to compress what you have, but to generate 
> smaller PDF in the first place. Unfortunately PDF doesn't do a great job of 
> selecting compression options for you, so you have to do the "think work" for 
> it, choose compression (jpeg vs. lz), and such.
> 
> Hint: if you have a lot of graphs, line drawings, and similar, reduce them to 
> b/w (if appropriate) PNG, rather than greyscale and/or jpeg. Pages in b/w can be 
> encoded with jbig and will be tiny compared to almost any other format.

Thanks, I was hoping that there might be a more ready solution but
this (converting all pdf image files to png - and I had north of 50 pdf
files) is exactly what I have now done, using ImageMagick and a perl
script as follows:

#!/usr/bin/perl

use strict;

my @pdfs = `ls *.pdf`;

for my $pdf (@pdfs) {
        chomp $pdf;
        my $file = $pdf;
        $file =~ s/.pdf$//;
        print STDERR "convert $file.pdf $file.png\n";
        `convert $file.pdf $file.png`;
}


Thanks again for all the helpful suggestions! The file size comes down
from 36 MB to 6.4 MB.

Ranjan
-- 
Important Notice: This mailbox is ignored: e-mails are set to be
deleted on receipt. For those needing to send personal or professional
e-mail, please use appropriate addresses.

____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux