I am new to PDFBox and Boxable and I'm hoping if someone could help me with this! This question is in reference to a question asked here (Ref: https://github.com/dhorions/boxable/issues/89 ) In this, flurinBoonea presented a small sample code to put Text, Image and Table all in the same page. My question is, if I want to create a Table (which has dynamic height based on the content inside) and then I need to put some text after the table. How am I able to do that ?!? Somewhere I read that while drawing the table I use something similar to get the YPosition for next element,
float yPosition = table.draw()
And then use this position for the next element but whenever I use table.draw before the following piece of code,
PDPageContentStream contentStream = new PDPageContentStream(doc, page);
contentStream.beginText();
contentStream.setFont(font, 18);
contentStream.moveTextPositionByAmount(0, yPosition - 20);
contentStream.drawString("This is a test message");
contentStream.endText();
contentStream.close();
The table disappears and only the text is displayed. Not sure how to work around this. Can someone please help me with this. I'm sort of stuck with this problem for quite a while now. Thank you in advance