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

Reply via email to