Hello All, I wanted to convert .html file into .pdf. is there any rails plugin ?? Thanks, Sandip R~ -- Ruby on Rails Developer http://sandip.sosblog.com http://funonrails.wordpress.com www.joshsoftware.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 13 Jul 2009, at 09:55, Sandip Ransing wrote:> I wanted to convert .html file into .pdf. > > is there any rails plugin ??http://sublog.subimage.com/2007/05/29/html-css-to-pdf-using-ruby-on-rails However, PrinceXML is not free: http://www.princexml.com/purchase/ That said, it works extremely well, producing PDFs that are simply amazing. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Peter De Berdt wrote:> On 13 Jul 2009, at 09:55, Sandip Ransing wrote: > >> I wanted to convert .html file into .pdf. >> >> is there any rails plugin ??Prince looks great if you can afford it. Some of the folks at my local users'' group mentioned a couple other options (which I haven''t yet tried): * flyingsaucer is a HTML-to-PDF renderer. It''s written in Java, but even if you''re not using JRuby, you could shell out to it. It probably wouldn''t be hard to modify the Princely plugin to work with this. * prawn_formatter lets you use HTML syntax in generating PDF files with Prawn, so it might work for converting HTML to PDF. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
I''d also recommend princexml if you can afford it. And I''m a big f/ oss proponent. Been using it on a couple of apps for clients in the past couple of years and have been very happy with results. The coverage of (standard) print-related css is very good. I can''t tell you how much time has been saved by going the html/css -> pdf route, instead of generating pdf on-the-fly in app code. I am always on the lookout for f/oss alternatives. One of the latest alternatives I''ve looked at that''s getting pretty close (to meeting the specific needs of the projects I''m working on): wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/ Also, for anyone interested, If you need to do any post-generation pdf testing/manipulation (splitting, combining, ....), a couple other tools I''d recommend to use as well: pdftk http://www.accesspdf.com/pdftk/ pdfopt http://linux.die.net/man/1/pdfopt Jeff On Jul 13, 1:07 am, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> On 13 Jul 2009, at 09:55, Sandip Ransing wrote: > > > I wanted to convert .html file into .pdf. > > > is there any rails plugin ?? > > http://sublog.subimage.com/2007/05/29/html-css-to-pdf-using-ruby-on-r... > > However, PrinceXML is not free:http://www.princexml.com/purchase/ > > That said, it works extremely well, producing PDFs that are simply > amazing. > > Best regards > > Peter De Berdt
Hi Jeff svn checkout http://wkhtmltopdf.googlecode.com/svn/trunk/ wkhtmltopdf cd wkhtmltopdf cmake -D CMAKE_INSTALL_PREFIX=/usr . make I am getting following error, do you have any idea ? wkhtmltopdf.dir/wkhtmltopdf.cc.o -c /home/sandip/wkhtmltopdf/wkhtmltopdf.cc /home/sandip/wkhtmltopdf/wkhtmltopdf.cc: In function ‘int main(int, char**)’: /home/sandip/wkhtmltopdf/wkhtmltopdf.cc:556: error: ‘setGraphicsSystem’ is not a member of ‘QApplication’ make[2]: *** [CMakeFiles/wkhtmltopdf.dir/wkhtmltopdf.cc.o] Error 1 make[2]: Leaving directory `/home/sandip/wkhtmltopdf'' make[1]: *** [CMakeFiles/wkhtmltopdf.dir/all] Error 2 make[1]: Leaving directory `/home/sandip/wkhtmltopdf'' make: *** [all] Error 2 Thanks, Sandip R~ -- Ruby on Rails Developer http://sandip.sosblog.com http://funonrails.wordpress.com www.joshsoftware.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve always just used the statically compiled version of wkhtmltopdf (for testing). If you can''t use the static version, might want to search/work-with-maintainers to resolve build-from-src problems. Best of luck, Jeff On Jul 14, 1:03 am, Sandip Ransing <san2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Jeff > > svn checkouthttp://wkhtmltopdf.googlecode.com/svn/trunk/wkhtmltopdf > cd wkhtmltopdf > cmake -D CMAKE_INSTALL_PREFIX=/usr . > make > > I am getting following error, do you have any idea ? > > wkhtmltopdf.dir/wkhtmltopdf.cc.o -c /home/sandip/wkhtmltopdf/wkhtmltopdf.cc > /home/sandip/wkhtmltopdf/wkhtmltopdf.cc: In function ‘int main(int, > char**)’: > /home/sandip/wkhtmltopdf/wkhtmltopdf.cc:556: error: ‘setGraphicsSystem’ is > not a member of ‘QApplication’ > make[2]: *** [CMakeFiles/wkhtmltopdf.dir/wkhtmltopdf.cc.o] Error 1 > make[2]: Leaving directory `/home/sandip/wkhtmltopdf'' > make[1]: *** [CMakeFiles/wkhtmltopdf.dir/all] Error 2 > make[1]: Leaving directory `/home/sandip/wkhtmltopdf'' > make: *** [all] Error 2 > > Thanks, > > Sandip R~ > -- > Ruby on Rails Developerhttp://sandip.sosblog.comhttp://funonrails.wordpress.comwww.joshsoftware.com
You need version 4.5 of the QT library. On Jul 14, 6:03 pm, Sandip Ransing <san2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Jeff > > svn checkouthttp://wkhtmltopdf.googlecode.com/svn/trunk/wkhtmltopdf > cd wkhtmltopdf > cmake -D CMAKE_INSTALL_PREFIX=/usr . > make > > I am getting following error, do you have any idea ? > > wkhtmltopdf.dir/wkhtmltopdf.cc.o -c /home/sandip/wkhtmltopdf/wkhtmltopdf.cc > /home/sandip/wkhtmltopdf/wkhtmltopdf.cc: In function ‘int main(int, > char**)’: > /home/sandip/wkhtmltopdf/wkhtmltopdf.cc:556: error: ‘setGraphicsSystem’ is > not a member of ‘QApplication’ > make[2]: *** [CMakeFiles/wkhtmltopdf.dir/wkhtmltopdf.cc.o] Error 1 > make[2]: Leaving directory `/home/sandip/wkhtmltopdf'' > make[1]: *** [CMakeFiles/wkhtmltopdf.dir/all] Error 2 > make[1]: Leaving directory `/home/sandip/wkhtmltopdf'' > make: *** [all] Error 2 > > Thanks, > > Sandip R~ > -- > Ruby on Rails Developerhttp://sandip.sosblog.comhttp://funonrails.wordpress.comwww.joshsoftware.com
Hi guys ! I used prawn to generate pdf document. its clean and simple to code. but i am facing one problem. In one of my table row i wanted to "Total IDV" text aligned centered. but its not working. [ {:text => "Total IDV", :colspan => 3, *:align => :center* },"#{ total_idv }" ] NOTE: *:text_align => :center, **:align => :center* is not producing any effect. * *Do you have any ideas ?? Cheers ! Sandip R~ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Sandip, On Thu, 2009-07-16 at 21:54 +0530, Sandip Ransing wrote:> but i am facing one problem. > In one of my table row i wanted to "Total IDV" text aligned > centered. > but its not working. > > [ {:text => "Total IDV", :colspan => 3, :align > => :center },"#{ total_idv }" ] > > NOTE: :text_align => :center, :align => :center is not producing any > effect. > > Do you have any ideas ??You might want to ask CSS questions on the css-d list. They''re experts and are very helpful. Make sure you validate your html before you ask for help though (http://validator.w3.org) Best regards, Bill
bill walton wrote:> Hi Sandip, > > On Thu, 2009-07-16 at 21:54 +0530, Sandip Ransing wrote: > >> >> Do you have any ideas ?? > > You might want to ask CSS questions on the css-d list.Looks to me like Sandip had Prawn questions, not CSS questions -- in which case he should ask the Prawn team. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Thanks Marnen ! i will ask question to prawn team Sandip R~
Sandip Ransing wrote:> Hi Jeff > > svn checkout http://wkhtmltopdf.googlecode.com/svn/trunk/ wkhtmltopdf > cd wkhtmltopdf > cmake -D CMAKE_INSTALL_PREFIX=/usr . > make > > I am getting following error, do you have any idea ? > > wkhtmltopdf.dir/wkhtmltopdf.cc.o -c > /home/sandip/wkhtmltopdf/wkhtmltopdf.cc > /home/sandip/wkhtmltopdf/wkhtmltopdf.cc: In function ‘int main(int, > char**)’: > /home/sandip/wkhtmltopdf/wkhtmltopdf.cc:556: error: ‘setGraphicsSystem’ > is > not a member of ‘QApplication’ > make[2]: *** [CMakeFiles/wkhtmltopdf.dir/wkhtmltopdf.cc.o] Error 1 > make[2]: Leaving directory `/home/sandip/wkhtmltopdf'' > make[1]: *** [CMakeFiles/wkhtmltopdf.dir/all] Error 2 > make[1]: Leaving directory `/home/sandip/wkhtmltopdf'' > make: *** [all] Error 2is wkhtmltopdf worked in solaris machine.. i got error.... -- Posted via http://www.ruby-forum.com/.