iTextSharp PDF - Acrobat Reader Error on Print

823 Views Asked by At

I receive the following error message when I attempt to print the iTextSharp generated .pdf file: "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."

I have narrowed it down to this section specifically:

        PdfContentByte cb = pdfWriter.DirectContent;
        cb.BeginText();
        ColumnText ct = new ColumnText(cb);
        ct.SetSimpleColumn(new Phrase(new Chunk(pd.Abstract, FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.NORMAL))), 74, 370, 550, 0, 12, Element.ALIGN_LEFT | Element.ALIGN_TOP);
        ct.Go();
        cb.EndText();

Any ideas what I'm doing to trigger this error message? It prints without a problem other than the error message.

1

There are 1 best solutions below

0
On

You might be able to find more information by using a validation tool on the generated output pdf file.

http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx

This tool gives some pretty insightful details about the validity and has a few options for what to validate.