Does such a plugin for handling the marriage of rails data into existing
PDF forms exist?
This would be really cool.
Craig
Does such a plugin for handling the marriage of rails data into existing
PDF forms exist?
This would be really cool.
Craig
On Fri, 2007-12-14 at 16:03 -0700, Craig W. wrote:
Does such a plugin for handling the marriage of rails data into existing
PDF forms exist?This would be really cool.
Is there really no one doing this at all?
I’m shocked because there are tools for perl and php for using pdftk and
merging data into PDF forms on the fly and it seems like such a slam
dunk for RoR
Craig
Hi Craig,
Take a look at http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs
or
Google rails pdf writer
Best regards,
Bill
----- Original Message -----
From: “Craig W.” [email protected]
To: [email protected]
Sent: Saturday, December 15, 2007 4:58 PM
Subject: [Rails] Re: ****[Rails] pdf fdf implemenation
For a project I am looking at doing in the future I have been
searching for something that will let me take existing pdfs so that I
can individualize them for specific users… I was recommended the
following app (it isn’t free though): PDF Batch Stamp Tool, at:
http://www.pdf-tools.com… It is a command line tool, but it looks
like it would do what I am looking for quite painlessly… Don’t know
if this is what you are looking for, but maybe it will help.
Best Regards,
Mark
PDF Writer can’t do that as far as I can tell…I’ve been through it and
trust me, I’ve googled my little ears off. Finally found what I wanted
at rubyforge.org
What I did find that worked was pdf-stamper gem (uses the Ruby Java
Bridge) which has remarkably sparse documentation but I actually got it
to work (YEAH!) but the link in the middle of the page (PDF Form Fill)
that does it without java might even be better (or worse…)
Thanks, I don’t generally look at wiki.rubyonrails.org because past
disrepair has been disconcerting.
Craig
On Sat, 2007-12-15 at 19:19 -0800, mksys wrote:
For a project I am looking at doing in the future I have been
searching for something that will let me take existing pdfs so that I
can individualize them for specific users… I was recommended the
following app (it isn’t free though): PDF Batch Stamp Tool, at:
http://www.pdf-tools.com… It is a command line tool, but it looks
like it would do what I am looking for quite painlessly… Don’t know
if this is what you are looking for, but maybe it will help.
if you look at the post you replied to (mine), you’ll see that the issue
is solved with free software (ruby gem called pdf-stamper)
Craig
Hey Craig –
I’m trying to do the same thing, and have come across the same total
lack of documentation. Do you have any code snippets you’re willing to
share? Thanks!
-Lucas
Hi Craig!
Me too digging with this same situation of pdf-stamping, I’m here and
has been through many other googled posts. I have setup everything-
rjb,JAVA_HOME,jdk, and pdf/stamper gem. In stamper.rb file of the gem, I
don’t have any Fdf class. Only one class Stamper is there.
Here is the code http://pastie.org/381005 of my stamper.rb file
but in your code snippet above, you have used FDF, (@fdfobj = Fdf.new
) on the 2nd line of the method.
Did you just wrote it for the example sake or you do really have this
class in your gem??
Can you paste the code of your stamper.rb file or I’d be greatful to
send the zipped version of this gem folder at
millisami[at]gmail[doc]com!!!
On Wed, 2008-02-27 at 22:26 +0100, Lucas Haley wrote:
Hey Craig –
I’m trying to do the same thing, and have come across the same total
lack of documentation. Do you have any code snippets you’re willing to
share? Thanks!
you don’t give any indication where you’re at so I’m not sure that this
will be helpful but first…
I am using mongrel_cluster so I added the following little snippet to
the init.d/mongrel_cluster
JAVA_HOME=/usr/java/jdk1.6.0_03
export JAVA_HOME
added the following to application.rb (you have to install the gems
first)
require “rjb”
require “pdf/stamper”
then my controller snippet has…
def guardian_fdf_form
@client = Client.find(params[:id])
@fdfobj = Fdf.new
@fdfobj.url = “http://my_local_webserver/Agreement.pdf”
myfdf = @fdfobj.create_header
myfdf += @fdfobj.add_data({“guardian”,@client.clwholename})
myfdf += @fdfobj.specify_pdf(@fdfobj.url)
myfdf += @fdfobj.create_footer
send_data(myfdf, {:type => “application/vnd.fdf”,
:stream => false,
:filename => “Agreement_out.fdf”})
end
Craig
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs