My name is AJ, and I'm a web developer and software engineer out of Southern California.
Written one year ago
I'm applying to go back to school to get another degree, and I found myself needing to fill out a lot of PDF Forms. That's evidently a difficult task on Linux. I couldn't find any simple ways to do it, anyhow. So my options were either A) print out the forms and submit my chicken scratch handwriting, or B) hack together a solution for myself. Enter GhostScript and Inkscape.
I'm a huge fan of Inkscape. It is a versatile SVG authoring tool with the most natural keyboard shortcuts I've ever learned, and it's a ball of fun to play with. I design my site layouts with it, create graphics and logos, iron out simple flowcharts and mindmaps ... I could go on. It's a cool tool, check it out!
I've also got a growing sense of appreciation for the GhostScript project. It's got a very steep learning curve, but it has saved my butt a few times over the years. With PDF documents becoming more prevalent these days, being able to manipulate them is an invaluable skill.
So, yesterday, I needed to fill in a PDF Form. If you haven't had to fill one in yourself yet, you'll be surprised how few options you have for Linux. Forums, Mailing Lists, Google searches ... all turned up pretty empty. The closest thing I found was a tool called Scribus, which allows you to create fillable forms, but never had any mention of actually filling them in. I need a way to fill in preexisting PDF forms.
Thankfully, I've been reading the Inkscape documentation, and found that Inkscape can import PDF's one page at a time. Even better than that, I learned a lot about GhostScript recently trying to reformat a huge set of Python PDFs for print. In short, I can split a PDF into individual pages, add text with Inkscape, and smash the resulting SVG's together into a single, filled-out PDF.
Pretty cool, huh? Enjoy
Here are the quick scripts I wrote to make this job a cakewalk:
drf_ink2pdf [-C output_folder] file.svg [file2.svg file3.svg ...]
drf_ink2pdf [-C output_folder] file.svg [file2.svg file3.svg ...]
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=singlePage-%02d.pdf multiPage.pdf