Search This Blog

August 27, 2010

Convert [from/to] PDF [to/from] PS (PostScript)

In Ubuntu, it only takes a couple of steps for you to convert from/to PDF to/from PS or postscript.

For this you may have to install pdftops (read as PDF TO PS). You can install this from either Ubuntu's Synaptic Package Manager or from terminal by running the below command:
$ sudo apt-get install xpdf-utils

For this you may also have to install ps2pdf, if only, it is not available by default with Ubuntu.

Command: Convert PDF -> PS
$ pdftops -paper [letter,legal,A4,A3,match] -upw <userpwd4encryptedfile> pdf_file_name.pdf
Eg:

$ pdftops -paper A4 -upw kartzontech my_contacts.pdf
where,
-paper A4 option implies that I want the PDF to serve A4 paper size compatible PDF
-upw kartzontech throws a password (kartzontech) to sign-in to password protected PDF file for its conversion to PS


Command: Convert PS -> PDF

$ ps2pdf source.ps destination.pdf

Ebook Suggestion:
For big bundle of tips, tricks, hints and hacks in Ubuntu, the book from Pragmatic Bookshelf should be of great help. See Ubuntu Kung Fu: Tips, Tricks, Hints, and Hacks for more information.