Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Idea for PDF template server. Does anyone besides me need this?
3 points by BjoernKW 1406 days ago | hide | past | web | 3 comments | favorite
I've recently come across a tedious problem with PDF generation for several enterprise web applications.

The requirements for these applications are nothing spectacular: Take some HTML form input, take a PDF template provided by the legal department and fill in the user input.

Problem is, with the usual (enterprise) PDF generation tools like iText or Jasper Reports you can do everything but the most common tasks like simple adding some text at a specific coordinate are ridiculously complex. Especially, if the aforementioned legal department didn't use AcroFields for the blanks to be filled in.

So, I tried to come up with a simpler solution to this problem. What I currently have in mind is a web app that takes a URL to a PDF template and displays it using Mozilla's pdf.js. Using some HTML5 canvas techniques it would allow you to drag and drop text fields as placeholders at the positions where you want text to be inserted.

This template and the associated placeholders would then be available via a REST API. This API would take key-value pairs as input for the placeholders and return a PDF rendered with that input.

My question is: Does anyone besides me need such a solution? Sure, the problem bugs me and such solution would provide some value to me but I first wanted to see if this issue exists for other developers as well or if maybe there already are viable solutions to it.

I'm dealing with something similar, but the forms come from the government, and they seem to have intentionally made it so one has to print the forms out and fill them in by hand (form data is not savable),

Since these forms are only published once per year, I've taken to altering them with Adobe LiveCycle Designer so that the form fields are fillable programmatically. So, just like you are doing I can take html form input and fill out multiple forms at once as there is lots of redundant data.

I don't have this working perfectly yet, but I am using this project[1] used in tax form filing as a basis (which relies on PDFtk and node.js).

[1] https://github.com/codehero/OpenTaxFormFiller

This is what I use for this:


We have one server setup to do all the grinding and it runs as a service. Programs can submit the template key with a dictionary of data to render on the form.

Thanks for your input. ReportMill sounds particularly interesting.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact