This application is very, very simple; it's a practically the starting skeleton of a modern Rails/Devise application.
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.
> 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".
As others have pointed out, the (not really open source) license doesn't allow any uses for other purposes.
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 used Apache Fop (http://xmlgraphics.apache.org/fop/) to convert XML to PDF at a previous job. It was extremely painstaking work. On the other hand, it gives you a lot of fine-grained control over the appearance of your PDF.
Yeah, it changes the game when you need to fill out a pre-existing PDF form with user-supplied data (as opposed to free form PDF generation). In my experience, you pretty much have to use a Java library (such as iText) for this. So for a Rails app, that means JRuby, queue to a Java daemon processor, or something along those lines.
The first part of the software license looks to be BSD/MIT-like with the to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,... sentence, but then there's this paragraph:
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.
The point of this software is to make it easier for people who have never registered before to register. The Democratic party probably spent their resources on this because they think that a large percentage of unregistered voters come from demographic groups that tend to vote for Democrats, such as recent college grads who were not yet old enough to vote in the 2008 election.
How would your strategy improve the expected outcome for the Democrats?
I worked as a Rails dev at the DNC in 2010-2011. I pushed for open-sourcing our fully-featured voter reg. Rails app back then, but didn't find much support for the idea. The political world is pretty wary of "giving code away" because the opposition will use it, etc. So, progress?
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.
[+] [-] tptacek|13 years ago|reply
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.
[+] [-] cperciva|13 years ago|reply
FWIW, I've found that "generate HTML and feed it through wkhtmltopdf" is a surprisingly effective way of doing this.
[+] [-] luriel|13 years ago|reply
As others have pointed out, the (not really open source) license doesn't allow any uses for other purposes.
[+] [-] nakkiel|13 years ago|reply
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.
[+] [-] ekoontz|13 years ago|reply
[+] [-] cap10morgan|13 years ago|reply
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.
[+] [-] gary4gar|13 years ago|reply
[+] [-] Hoff|13 years ago|reply
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.
[+] [-] balpha|13 years ago|reply
[+] [-] tptacek|13 years ago|reply
[+] [-] tubbo|13 years ago|reply
[deleted]
[+] [-] gary4gar|13 years ago|reply
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?
[+] [-] cheald|13 years ago|reply
[+] [-] grandalf|13 years ago|reply
[+] [-] greenyoda|13 years ago|reply
How would your strategy improve the expected outcome for the Democrats?
[+] [-] cap10morgan|13 years ago|reply
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.
[+] [-] mediocregopher|13 years ago|reply
I do like the trend towards technological openness though, hopefully we'll be seeing more of this sort of thing.
[+] [-] dnctroll|13 years ago|reply
[+] [-] grourk|13 years ago|reply