Hacker News new | comments | show | ask | jobs | submit login

Read your comment (and other's) about the PDF filling and got interested into looking at the source.

I think doing it this way is wrong. It's essentially the same thing as putting your code and HTML together in a PHP file for example.

When the format of a PDF file is fixed and must be filled computationally, I'd advise to add PDF fields to the original and fill those by name through API calls instead of using coordinates.

That way, you can hope to write your code once and update the PDF when necessary.

But OK, it's all pretty dumb and maybe not worth a mention at all.

I think there's two things going into that: first, that Prawn's support for PDF forms is janky, and second, that the way they implemented the precise look/feel of the original PDF form was to use a cut-down version of the original as a template.

Which is a good thing to know how to do; I've had to deal with forms that were very annoying to reproduce with the tools available to Ruby programs.

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