Editing a PDF (sorta) on Ubuntu

I have more than once had to fill in a paper form for people in America. Obviously, doing such things is a huge pain, because actual paper mail — with stamps — isn’t just so last century, it’s the century before that. You know, the one with robber barons and Lord Kelvin and workhouses. Put a stop to it. Email. Email, I tell you. It’s gonna catch on, just you wait.

Anyway, a fair few American corporations (and, wouldjabelieveit, the American government too) provide PDF versions of their forms so you can download them and print them out at your leisure. They’re still designed to be printed and written on, though — they’re not officially PDF “forms” in the sense that the PDF reader can give you textboxes and an FDF file to fill them in, they’re just PDF documents. Nonetheless, I find myself wanting to be able to open them up in OpenOffice.org and edit them.

Now, you can’t do that. (Well, you might be able to, but it’s hard.) All I actually need to do is overtype them. So what I do is:

  1. Convert the PDF to an EPS file with pdftops: pdftops -eps AmericanGovernmentForm.pdf (the pdftops program is in the poppler-utils package)
  2. Create a new empty document in OpenOffice.org and drag the new .eps file onto it, which will embed it as an image
  3. Use Insert | Frame to draw a text frame on top of the new image (set it to have no border; set the background colour to anything other than No Fill and transparency to 100%)
  4. Overtype onto the form in the text frame
  5. Export as PDF to get a PDF version with your text in
  6. Email it to the government

No stamps. Their evil must be stopped.

10 Responses to “Editing a PDF (sorta) on Ubuntu”

  1. Inkscape 0.46 (in Ubuntu Hardy) lets you edit PDFs directly.

    John E.
  2. Ubuntu also has pdfedit.

    Alex
  3. Why not just use Xournal? It lets you annotate PDF’s with text, doodles, whatever.

    http://xournal.sourceforge.net/

    I’ve used it with a Wacom tablet to sign documents that previously had to be printed, signed, rescanned and emailed back.

    Since everyone feels the need to mention their distro, I’ll mention that Fedora has it ;-)

    Cliff Wells
  4. Ooh, perhaps the pain will end.

    Alex, pdfedit is horrible. I gave up on it. All I want to do is fill in the friggin’ form.

    Inkscape, you say?

    ethana2
  5. I think you missed out:

    7. Government reject email requesting paper copy with signature in ink.

    ;-)

    Rob
  6. Looks like everyone has their own way of dealing with this problem. :) Thought I’d give my method. Basically, it just involves opening up the PDF in Gimp (It has a really handy import feature that lets you open up each new page as a layer or a separate image). And then I just put in text forms where I need them. Save it in whatever Gimpy format you like.

    Brian
  7. Didn’t know about Inkscape (well, I’m not running hardy yet). Pdfedit makes me cry bitter, bitter tears of frustration every time I try and use it for anything, and as far as I can tell I can’t make it import my signature as an image. Xournal is for tablet-ish people, as I understand it; I didn’t think you could type text into it. I’ll give it a try, too!

    Rob: so far, I haven’t had forms rejected with a demand for a paper one. If that happens then I lose, I concede :)

    sil
  8. Erm, I’d like to point out that email is far from the future, it is dead… Email has become a corporate necessity and nightmare all at once with spam killing its usefulness as well as the inherently insecure nature of email (try some smtp commands using the mail from:someguy@fbi.gov) and the users unnatural ability to think that some random person they’ve never heard of with a dodgy address is actually sending them nude britney pics….

    The problem with email is we have nothing that works, and nothing that can be adopted in place…

    Oh and go on mention RSA/PGP/DSA/GPG all you want, you and I both know that theres only like 5 people that actually use it in the real world, until it becomes a mandatory requirement of email (hah! with webmail like yahoo/gmail the point of it is defeated once again) then email will never ever work…

    Stick your john handcock on the paper and snail it over the water… Its the only way to be remotely safe.

    Karl Lattimer
  9. I use flpsed. Looks ugly, but does the job.

    behdad
  10. Inkscape is definitely the way forward. The only problem is that it doesn’t necessarily import the font of the original document.

    Inkscape is a fantastic program irrespective of its pdf capabilities though. It’s like Adobe Illustrator but better (some of the best UI stuff around). I salivate for the day that they start supporting svg animations.

    :)

    spool

Leave a Reply

OpenID is a decentralised authentication system. If you use LiveJournal or Vox you already have an OpenID; just use the URL of your homepage there. See also how to get yourself an OpenID.