lundi 14 mai 2012

ps2png or pdf2png how to create high quality images from just about anything in Linux

I had this PDF I had to sign for the company I work for. It is a pain to print it out, sign it and scan it to send it out again. So I thought I would use ps2png, which works with PDF's as well, BTW, and use Gimp to insert a scan of my signature at the required position.

The problem we all come across is that ps2png sucks in terms of quality.

Linux (Unbuntu 11.10) comes with the print to svg feature, which is cool. Print the PDF, or whichever file you have, to SVG and use inkscape.

Emacs was bad, inkscape sets new records in ui complexity ... it is the first graphical editor I have come across where you just cannot select a portion of the image to copy and paste it into another. It is also the first graphical editor where you cannot use the mouse to move an inserted image around without invoking some obscure incantations, so use the arrow keys.

The bug (?) I came across was, that the page of the PDF was displayed hundreds (thousands?) of times in the SVG. When you print the resulting image to PDF, you only see it once. In inkscape, you need to edit the image on the bottom left. Click the blue arrow to insert your image, move it to the appropriate location and you can print it. You could also at this point export it to png, In the export dialog, click [Page].


EDIT: inkscape makes PDF's so crisp they make professional marketing guyz shit their pants.