Please share the file and the stack trace and clarify which line is where in your code.

Tilman

Am 03.02.2020 um 16:09 schrieb Robert Pepersack:
Hi all,

I'm trying to put a table in an existing PDF file that has content (so far,
just a footer at the bottom of the page).  When I load the page, I get this
exception:
ERROR o.a.p.f.FlateFilter [main]: FlateFilter: stop reading corrupt stream
due to a DataFormatException

Here is the code that loads and uses the PDF file:

         File pdfFile = pdfUtil.getPdfFile("pdf/table.pdf");
         PDDocument document = PDDocument.load(pdfFile);
         PDPage page = document.getPage(0);
         PDPageContentStream contentStream =
                 new PDPageContentStream(document, page,
PDPageContentStream.AppendMode.PREPEND, false, true);
BaseTable table =
                     new BaseTable(yPosition, yStartNewPage, bottomMargin,
tableWidth, margin, document, page, true, drawContent);

Thanks!
Bob



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to