Blog

Using pkfix to fix (some) old TeX-generated PDF (PS) files

Here’s an arcane bit of knowledge that may be applicable sometimes: there is a tool called pkfix that can be used to improve the rendering of certain old PostScript files.

(Will add more details later.)

Example 1

Original: https://cs.uwaterloo.ca/~shallit/Papers/change2.pdf = https://shreevatsa.net/post/2023-pkfix/change2.pdf

Fix:

wget "https://cs.uwaterloo.ca/~shallit/Papers/change2.ps"
pkfix change2.ps change2-fixed.ps
ps2pdf change2-fixed.ps

Result: https://shreevatsa.net/post/2023-pkfix/change2-fixed.pdf

Side-by-side, it looks like (open image in new tab and see at 100%):

diff

Example 2

Compare https://courses.cs.duke.edu/spring02/cps296.1/papers/H-SIGMOD1999.pdf and https://shreevatsa.net/post/2022-pkfix-etc/tr-98-033_pkfix-helper_pkfix_pstopdf.pdf

Example 3

Compare https://web.archive.org/web/20160418212350/https://www.cs.uml.edu/ecg/pub/uploads/OPLspr09/genesis-of-lisp-jmc.pdf and http://slackwise.net/files/docs/The%20Roots%20of%20Lisp.pdf

More details

(WIP)