The Lumber Room

"Consign them to dust and damp by way of preserving them"

Converting old PS files (generated with LaTeX) to searchable PDFs

with 5 comments

pkfix fasc3a.ps fasc3a-fix.ps
ps2pdf fasc3a-fix.ps

A common (or at least, more common than it should be) scenario: you find a PostScript file of some paper, clearly written in (La)TeX, but which looks blurry on screen and you cannot copy any text. Converting to PDF with, say, ps2pdf does not help either. You curse the .ps format, and put up with the blurriness or print it out (where it looks fine) to read it.

Turns out it doesn’t have to be this way. The problem is that the PS file is using bitmap fonts, but assuming you have the scalable (Type 1) versions of those same fonts on your system, you can convert the fonts! There’s a script called pkfix, distributed with TeX Live, which will take a ps file that uses bitmap fonts and try to convert it to use scalable fonts. Just run it as

pkfix inputfile.ps outputfile.ps

This should produce a PS which isn’t blurry and is searchable, but if you prefer PDF, the usual way will work

ps2pdf outputfile.ps

or on Mac OS X if you don’t have ps2pdf for some reason, o inputfile.ps -a macps2pdf where macps2pdf comes with MacGhostView.

If the file is very old (generated with dvips from before 1996) and pkfix doesn’t work, there’s a further script called pkfix-helper that may make the file appropriate for pkfix.

BTW, if it’s your own files that are coming out blurry, something is wrong with your setup. Just install the package cm-super from CTAN—sudo tlmgr install cm-super or whatever—and no other change is needed. Or you can use the lmodern fonts with \usepackage{lmodern}, but that shouldn’t be necessary.

About these ads

Written by S

Thu, 2011-05-05 at 11:42:30 +05:30

Posted in compknow

Tagged with , ,

5 Responses

Subscribe to comments with RSS.

  1. Thank you so much!
    Incredibly helpful when I read those old papers on my LCD.

    friend

    Mon, 2011-07-18 at 16:44:48 +05:30

  2. Thank you very much, this worked flawlessly.

    Thanks a lot to the authors of pkfix-helper and pkfix as well.

    Paolo

    Tue, 2012-12-04 at 20:40:37 +05:30

  3. Dude this is amazing!!!! Thanks a lot!

    Cupitor

    Mon, 2014-01-20 at 20:20:48 +05:30

    • Glad you found it useful. Please spread the word; you may save someone else from blurry files.

      S

      Mon, 2014-01-20 at 22:56:20 +05:30


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 75 other followers