I have a requirement to generate views (list and show views, including data and uploaded images) into a format that can be saved and/or emailed. I''m looking for opinions on the easiest way to achieve this. I''ve researched the use of both PDF::Writer and Prawn, and it seems that to re-generate my views in pdf format will require a lot of work. Is there an easier way using .rtf or .doc files? The customer does not have a preference, they just want the ability save/send hard-copies. Thanks, Brian -- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brian Penrose wrote:> I have a requirement to generate views (list and show views, including > data and uploaded images) into a format that can be saved and/or > emailed. I''m looking for opinions on the easiest way to achieve this.HTML can be saved or e-mailed. So can plain text. What more do you need?> I''ve researched the use of both PDF::Writer and Prawn, and it seems that > to re-generate my views in pdf format will require a lot of work. Is > there an easier way using .rtf or .doc files? The customer does not > have a preference, they just want the ability save/send hard-copies.Use PDF if HTML is not sufficient. MS Word files have no place on the Web or in e-mail since they do not reliably preserve formatting across computers, and RTF suffers from the same issues. If you don''t want to recreate your views in Prawn markup, then try prawn_format, Flying Saucer, wkhtmltopdf, or Prince, all of which will generate PDF files from HTML. .> > Thanks, > BrianBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. --0022158df84fd73aa1047d34be43 Content-Type: text/plain; charset=ISO-8859-1 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0022158df84fd73aa1047d34be43--
Hi Brian, I''d definitely recommend going with pdf, and use either princexml (http://www.princexml.com/features/) or wkhtmltopdf (http:// code.google.com/p/wkhtmltopdf/) to generate pdfs from your app''s html/ css. You''ll save a ton of time and effort using one of these two tools, since you''d be working with the same html (with possibly slightly diff css applied for the pdf output) used in your web app ui. As for which one to choose, .... If you (or the client?) can afford the princexml license, princexml has greater print-related-css implementation coverage than wkhtmltopdf. If you can''t afford or don''t want to pay for the license, then go with wkhtmltopdf (and work around any of those missing css calls as necessary). Jeff On Jan 15, 6:14 am, Brian Penrose <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have a requirement to generate views (list and show views, including > data and uploaded images) into a format that can be saved and/or > emailed. I''m looking for opinions on the easiest way to achieve this. > I''ve researched the use of both PDF::Writer and Prawn, and it seems that > to re-generate my views in pdf format will require a lot of work. Is > there an easier way using .rtf or .doc files? The customer does not > have a preference, they just want the ability save/send hard-copies. > > Thanks, > Brian > -- > Posted viahttp://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.