boxable icon indicating copy to clipboard operation
boxable copied to clipboard

WARNING: ClosePath without initial MoveTo

Open markusvorraber opened this issue 8 years ago • 7 comments

When drawing a table, this warning appears very often in log: WARNING: ClosePath without initial MoveTo Also see here: #55

I already tried to remove all occurrencies of "tableContentStream.closePath()" of the class Table.java. If you remove this lines, the warning disappears and the PDF is OK.

Can you do this?

Regards

markusvorraber avatar Apr 25 '17 08:04 markusvorraber

Can you provide some test case so I can quickly reproduce this? I am aware of #55 but there was some other case with

 PDFRenderer renderer = new PDFRenderer(doc);
        BufferedImage imPage = renderer.renderImage(0); //this is throwing warnings

that caused troubles and I would like to see your test case.

Frulenzo avatar Apr 25 '17 08:04 Frulenzo

Its the same way to reproduce as #55. The logs appear when calling "renderer.renderImage(0)", but what if you remove the code lines tableContentStream.closePath() of your class Table.java?

markusvorraber avatar Apr 25 '17 10:04 markusvorraber

Did you tried to make image like wiki said? https://github.com/dhorions/boxable/wiki#image

Frulenzo avatar Apr 25 '17 11:04 Frulenzo

What do you mean, i don't want to add an image to pdf. I want to render the whole pdf AS image like this:

PDFRenderer renderer = new PDFRenderer(doc);
        BufferedImage imPage = renderer.renderImage(0);

markusvorraber avatar Apr 25 '17 12:04 markusvorraber

Wuopppps :smile: I didn't pay full attention :smile: Yeah, .closePath() method is redudant on more places in Table, TableCell classes and that needs to be fixed.

Frulenzo avatar Apr 25 '17 14:04 Frulenzo

okok cool, i look forward to the fix :)

markusvorraber avatar Apr 26 '17 05:04 markusvorraber

Hi, is a new version planned?

FabrizioFabio avatar May 23 '18 14:05 FabrizioFabio