Generate PDF from Bootstrap Html page

782 views
Skip to first unread message

Julien Mellano

unread,
Jun 17, 2014, 8:53:10 AM6/17/14
to flying-sa...@googlegroups.com
Hello,

I'm sur there is already a post on this thread, but since i didn't found it, I post one.

Each times I want to generate my PDF from my html page using bootstrap I've got exception.

First one is a NullPointerException from NaiveUserAgent.getBinaryResource.
I clean my CSS to remove "@font-face" declaration and now I've got 
java.lang.ClassCastException: org.xhtmlrenderer.render.BlockBox cannot be cast to org.xhtmlrenderer.newtable.TableBox

I've read a post to patch librairie with this code in BoxCollector.java 
                    if (container.getStyle().isTable() && c instanceof RenderingContext && container instanceof TableBox) {  // HACK

and it seems to works since next time...

Is there any other solution (upgrading version ? other librairie ? ) to get my PDF from my responsive html form ? 


Best regards,
Julien.

Patrick Wright

unread,
Jun 28, 2014, 5:04:52 AM6/28/14
to flying-sa...@googlegroups.com
Hi Julien

can you post a complete stack trace with the CCE?


Thanks
Patrick


--
You received this message because you are subscribed to the Google Groups "Flying Saucer Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flying-saucer-u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages