I am working on a website where I am required to convert an HTML view
into a PDF document. I have found some gems and plug-ins like
PDF::Writer, but none of these are good for converting HTML and CSS to
PDF file.
I found a gem called "Princely" which works with "PrinceXML". But
PrinceXML library is not free and we don't have money to pay for it as
we are non-profit.
Anyone who knows of a gem or plug-in that will best fit my scenario?
You could also just try and e-mail the guys at Prince and present them with your case and ask if they would be interested in sponsoring your non-profit project (in exchange for some kind of promotional banner or mentioning Prince perhaps).
I am using wicked_pdf plugin and having a hard time to get it working.
On windows XP, I get the error "fork() function is unimplemented on this
machine"
and on Mac OSX Snow Leopard, I get "Broken pipe" error.
I have given pdfkit a try which is working very well if I give it an
address like "http://google.com".
Just don't know how to specify the address of a page from within my app.
Giving address like "http://localhost:3000/test" is not working.
Here is the code for pdfkit:
format.pdf do
kit = PDFKit.new("http://google.com")
send_data(kit.to_pdf, :filename => "New.pdf", :type =>
'application/pdf')
end
If you are a non profit organization, you have a chance to obtain a nice
html to pdf converting library - PD4ML for
Ruby for free from http://pd4ml.com/. Just contact them.
I use a PDF converter driver found on the internet . Install it and it
becomes a selectable converter option.Then you can convert PDFs to many
forms in any program at all, including Adobe Acrobat . Just open a PDF,
select convert, and choice a form you want, then you can convert pdf to
html and vice versa.the task will be finished in several seconds. if you
haven't found a good choice , you can have a try. best wishes.
http://www.rasteredge.com/how-to/vb-net-imaging/pdf-convert-html/