Saturday, 25 September 2010

Edit a PDF using the Gimp

This is a continuation of my post on running a paperless office.
Only some PDF documents lend themselves to being edited using OpenOffice. Those that can be will be discussed in a later blog. Here we are going to describe how to use the Gimp to edit a PDF document.
On occasion PDF forms received that need to filled out. The typical way to enter these forms is to print them, add the requested information, then finally, scan or facsimile the document back. What I will describe here is a way to update a form electronically so you can then email or fax directly the completed document.
The methods described below were developed over time as part of my initiative to run an paperless office.
Suppose you have a multi-page PDF document to be updated. Each page will be separately edited and the final result stitched together. There are two reasons for this: Firstly this reduces the risk of losing the entire document on a mistake. So, you'll be able to recover up to last completed page. And secondly, The Gimp is memory hungry, so opening a page at a time means a more response machine.
Use The Gimp to open the first page as a layer:
Open as Layers... (CTL+ALT+O)
Increase the Resolution from the default of 100 pixels/inch to at least 300. For best results choose a resolution 100 pixels per inch above your printers default.
Select the first page to edit.
Create a new transparent layer:
New Layer. (Shift+CTL+N)
Use Layer Fill Type with default Transparency. 
Identify the first entry to update, name the layer to reflect this entry. A transparent layer will be added for each new form field. This will allow you to individually place and edit form data.
Select the Text Tool (T). Using the Tool Options dialogue, set the desired font and colour. The font size will need to be adjusted to fit the form text size. Choose a colour so that your form entries standout. On a black form navy blue works well. It has a HTML colour code of 000080. Add the required text. Place the text correctly. Use the Move Tool (M) to reposition the text if needed. Finally Merge Down the text box into the associated named layer:
Layer ► Merge Down
Hint: Ensure the named layer is on the top of the layers stack.
Repeat this process for each form field.
Once the page is complete print the page as a PDF. Include a page number in the name to assist merging of multi-page documents.
Load the next page, and repeat.
At the end of all this you will have a multiple documents representing a single form. So the next step is to stitch them together. For this use Ghostscript. This gives you the power to combine files, convert files, and much more, all from the command line. To combine several input files into one combined PDF using Ghostscript:
gs -sDEVICE=pdfwrite -dSAFER -o combined.pdf first.pdf second.pdf third.pdf […]

2 comments:

Anonymous said...

Hi. This service here allows you to easily edit your PDF documents.
http://goo.gl/OyaBPM

You can fill out PDF form, save it, fax it, and email it.

Frank H Jung said...

Yes, I new about this site (or one like it), but my objection is uploading a form I need to edit to a web site. I'm thinking about privacy ...