How can I do arbitrary vector-oriented modifications to a PDF file on Linux, though all the editors are still buggy?

If you have a PDF which you want to modify (and can’t get hold of the source format file), you might have tried scribus to open and change it. This works well for some simple cases, but there are many import errors for more complex files. Also, the same might happen with Inkscape if you have managed to convert the file to SVG format, e.g. using CorelDraw on a Windows virtual machine.

What’s always possible is to import the file in GIMP (“File -> Open”), using a high resolution such as 300dpi. But you might want to avoid the big file sizes and loss in quality, and want to do it vector-oriented.

Therefore, the following solution should work out:

  1. Convert a low resolution raster image version of the PDF file, e.g. by opening in GIMP (with 150dpi) and saving in JPG format.
  2. Create a Draw drawing with the same page size as your PDF file, and place the raster image file into the background.
  3. Now that you have the placement of things, change the appearance by adding other elements on top your background. You might want to get some vector oriented elements out of the PDF file by importing the file in scribus and saving as SVG or EPS file, importing that in OOo Draw.
  4. Export the OOo file to PDF, temporarily removing your background for that. The good thing is that all OOo Draw elements get high-quality vecor oriented PDF elements.
  5. Add your new PDF file on top of the original one, by saying something like:
    pdftk in.pdf stamp overlay.pdf output out.pdf;

As the original vector elements are never converted from PDF to another format and back, no import / export bugs can come in the way!







Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.