Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Running an external GUI program

by jsegal (Friar)
on Feb 02, 2007 at 09:34 UTC ( #597911=note: print w/replies, xml ) Need Help??


in reply to Re: Running an external GUI program
in thread Running an external GUI program

What compression tool are you using?

Even if that tool doesn't have a batch/command-line way to run it, there are probably other equivalent tools out there. For example, you might look at http://multivalent.sourceforge.net/Tools/pdf/Compress.html It is admittedly not in perl (it is in the other popular four-letter cross-platform language), but it is a free tool that shrinks PDF files but keeps them as PDF format (i.e. it does the compression internal to the PDF format so they are directly readable by PDF viewers). It is command-line based. There is a perl script up on http://wiki.scribus.net/index.php/Web_optimised_PDF that uses the ghostscript library to create smaller PDF files -- that particular script is from a package called "Scribus", but it could serve as a starting point).

Best of luck.



--JAS

Replies are listed 'Best First'.
Re^3: Running an external GUI program
by zebedee (Pilgrim) on Feb 04, 2007 at 21:17 UTC
    Another tool to consider: pdftk

    From the blurb ...

    If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a command-line tool for doing everyday things with PDF documents. Keep one in the top drawer of your desktop and use it to:

    * Merge PDF Documents
    * Split PDF Pages into a New Document
    * Decrypt Input as Necessary (Password Required)
    * Encrypt Output as Desired
    * Fill PDF Forms with FDF Data and/or Flatten Forms
    * Apply a Background Watermark
    * Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
    * Update PDF Metadata
    * Attach Files to PDF Pages or the PDF Document
    * Unpack PDF Attachments
    * Burst a PDF Document into Single Pages
    * Uncompress and Re-Compress Page Streams
    * Repair Corrupted PDF (Where Possible)

    Pdftk allows you to manipulate PDF easily and freely. It does not require Acrobat, and it runs on Windows, Linux, Mac OS X, FreeBSD and Solaris.

    Pdftk is free software (GPL).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://597911]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (None)
    As of 2021-10-19 02:28 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My first memorable Perl project was:







      Results (76 votes). Check out past polls.

      Notices?