Sounds like the underlying html/css in your "complicated" test might
not be valid, such that prince is saying that it isn't able to
generate the pdf because it can't parse/process that html/css?  You
might want to run that html/css thru a validator first, like
http://validator.w3.org/ , to first fix any invalid html/css and then
try it again.

As for flyingsaucer, I looked into using that a while back but just
didn't like all of the dependencies required to get it working at the
time, especially for ruby/rails project.  But, maybe if you already
have a jvm installed, or are already running jruby, or ....

Whatever you end up using to gen your pdfs with, another tool you
might find useful is pdftk -- http://www.accesspdf.com/pdftk/ -- for
any pre-/post-processing of your pdfs, like splitting pdfs into pages,
stitching pdf pages together, adding watermarks, etc.

Jeff

On May 13, 9:40 am, Jonathan Steel <li...@ruby-forum.com> wrote:
> Thanks for the great info Jeff.
>
> You raise the same points that I have raised in our team. It would be
> easier to convert html into a pdf instead of us spending the time to
> develop code using Prawn for custom views.
>
> Prince worked on a simple page, but when I tried it on a more
> complicated one I got a ton of errors like the following:
>
> prince: /Users/jonathan/tmp/97.html:552: error: Opening and ending tag
> mismatch: div line 480 and html
>
> followed by just as many:
>
> prince: /Users/jonathan/tmp/97.html:552: error: Premature end of data in
> tag div line 372
>
> and ending with:
>
> prince: /Users/jonathan/tmp/97.html: error: could not load input file
> prince: error: no input documents to process
>
> I tried out wkhtmltopdf and really like it. My only concern at this
> point is that I can't get page breaking to work, and I found some recent
> posts that would suggest it can't do page breaking.
>
> I'm looking at acts_as_flying_saucer now, but can't get it to work for
> complicated examples. I will probably be going with either prawn,
> wkhtmltopdf, or acts_as_flying_saucer.
> --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to