Monday, September 03, 2007

Life without Windows - Playing with Pdfs



PDFs have become the most dominant document format in recent times. Here we discuss how to manipulate and create pdfs in linux

PDF Creation

If you OO Writer for all your spreadsheet needs, there is an "Export Directly to pdf" button on the toolbar which directly creates a pdf for you.

If you have a heavily MSWord Formatted doc file, OO won't work that well.

1. Either you can try using wv (a word viewer library)

eg. apt-get install wv
wvPDF [input doc] [output pdf]

High chances that even this fails to give you the perfect file.

2. Use an online coverter, the ones offered by Acrobat or Zamzar
http://www.zamzar.com/
I always use this service for all my pdf conversion needs.


Some other Tips

Manipulating PDF files - Using PDFtk

* Merge PDF Documents
* Split PDF Pages into a New Document
* Rotate PDF Documents or Pages
* Decrypt Input as Necessary (Password Required)
* Encrypt Output as Desired
* Fill PDF Forms with X/FDF Data and/or Flatten Forms
* Generate FDF Data Stencil from PDF Forms
* Apply a Background Watermark or a Foreground Stamp
* Report PDF Metrics such as Metadata and Bookmarks
* 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)


These are some of the options available. Cool eh !

apt-get install pdftk

pdftk myfile.pdf cat 1 output myfile-pg1.pdf dont_ask

The above command extracts the first page off your pdf and stores it to a destination pdf file.
The possibilities are endless. Look at man pdftk or pdftk --help for more options.

No comments: