One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format". There are a LOT of business processes that work like that.
FWIW, I've found that "generate HTML and feed it through wkhtmltopdf" is a surprisingly effective way of doing this.
That said: I used to do the same thing, and it works pretty well.
As others have pointed out, the (not really open source) license doesn't allow any uses for other purposes.
It could also be argued that because they have not warranted the product as fit for any purpose that there is no intended purpose.
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.
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.
It really is quite neat — if you define all your styles declaratively then the markup you touch is very clean and simple, e.g. something like this:
<office:document-content xmlns:office="…" xmlns:text="…">
Though I see they're using the prawn gem to do it here: https://github.com/democrats/voter-registration/blob/master/...
Last time I checked, prawn wasn't quite powerful enough for this use case. I'll have to revisit that approach.
This permission does not include: (a) any use of the Software other than for its intended purpose; or (b) any use of the Software in any manner that violates applicable law. Any use of the Software other than as specifically authorized herein is strictly prohibited and will terminate the license granted herein.
Yeah, I was thinking the same thing. I know some pedants argue that OSI don't have a registered trademark on "Open Source" and that they "don't get to decide what is or isn't open source." But in practice, many (most?) of us do acknowledge the OSI definition as being the de-facto definition of "Open Source."
And going against an organization that's "saturated with lawyers"?
Even if I were creating a voter registration web site, I'd likely not use this package, as reusing this PDF fulfillment package for any other use within that web site would potentially put the organization in licensing jeopardy. With this license, it'd be safer to re-implement rather than to re-use.
I'm not touching this license with a barge pole.
Looking at the source view(https://github.com/democrats/voter-registration/blob/master/...)
it doesn't seems there is some extra markup, unless I am missing something.
So, How can I implement the same in my rails app?
How would your strategy improve the expected outcome for the Democrats?
We were allowed to open-source some infrastructure code back then: https://github.com/dnclabs
Hopefully they'll continue working on this tool and make it something worth using and contributing to. I've tried to convince several political orgs. I worked for in the past to do this, but so far none have bitten.
I do like the trend towards technological openness though, hopefully we'll be seeing more of this sort of thing.