Stupi / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

ClassCastException: org.xhtmlrenderer.render.BlockBox cannot be cast to org.xhtmlrenderer.newtable.TableBox #192

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What is the expected output? What do you see instead?

When i try to print a webpage, it creates xhtml file using HtmlCleaner. When 
creating pdf , it throws exception.

java.lang.ClassCastException: org.xhtmlrenderer.render.BlockBox cannot be cast 
to org.xhtmlrenderer.newtable.TableBox
    at org.xhtmlrenderer.layout.BoxCollector.collect(BoxCollector.java:127)
    at org.xhtmlrenderer.layout.BoxCollector.collect(BoxCollector.java:139)
    at org.xhtmlrenderer.layout.BoxCollector.collect(BoxCollector.java:139)
    at org.xhtmlrenderer.layout.BoxCollector.collect(BoxCollector.java:139)
    at org.xhtmlrenderer.layout.Layer.paintAsLayer(Layer.java:462)
    at org.xhtmlrenderer.layout.Layer.paintFloats(Layer.java:157)
    at org.xhtmlrenderer.layout.Layer.paint(Layer.java:330)
    at org.xhtmlrenderer.layout.Layer.paintLayers(Layer.java:165)
    at org.xhtmlrenderer.layout.Layer.paint(Layer.java:340)
    at org.xhtmlrenderer.pdf.ITextRenderer.paintPage(ITextRenderer.java:384)
    at org.xhtmlrenderer.pdf.ITextRenderer.writePDF(ITextRenderer.java:348)
    at org.xhtmlrenderer.pdf.ITextRenderer.createPDF(ITextRenderer.java:315)
    at org.xhtmlrenderer.pdf.ITextRenderer.createPDF(ITextRenderer.java:246)
    at com.photon.phresco.framework.actions.htmlToPdf.main(htmlToPdf.java:112)

What version of the product are you using? On what operating system?
R8. win xp sp3.

Please provide any additional information below.
If I remove position: absolute;, it renders fine. Is there anyway to fix this 
issue ?

Original issue reported on code.google.com by kaleeswaran14 on 29 Feb 2012 at 11:13

GoogleCodeExporter commented 8 years ago
Flying saucer has been used in a module created by Nicolas LeRoux in the play 
framework.

I get the same error, when I am using the JBoss netty server on Ubuntu. This is 
the entire error log:

http://pastebin.com/BgRJy98F

Original comment by thetuxra...@gmail.com on 2 Nov 2012 at 5:46

GoogleCodeExporter commented 8 years ago
related to issue 144
related to issue 162
potential fix at https://github.com/flyingsaucerproject/flyingsaucer/pull/19

Original comment by robd...@gmail.com on 13 Nov 2012 at 7:23

GoogleCodeExporter commented 8 years ago
This also happens with any HTML that links to twitter bootstrap css 
(non-responsive).

Original comment by dale.lotts on 20 Feb 2013 at 2:26

GoogleCodeExporter commented 8 years ago
Right, that's how I first noticed it. The fix at 
https://github.com/flyingsaucerproject/flyingsaucer/pull/19 has been working 
for me.

Original comment by robd...@gmail.com on 20 Feb 2013 at 2:38

GoogleCodeExporter commented 8 years ago
Thanks for the info Rob - I updated the PR on GH to include a small sample 
document that can reproduce the problem - I'm not a big fan of the fix proposed 
in that PR, hopefully with a sample document that reproduced the problem there 
will be an "official" fix soon.

Original comment by dale.lotts on 21 Feb 2013 at 1:05