[
https://issues.apache.org/jira/browse/PDFBOX-1423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572251#comment-13572251
]
Hesham commented on PDFBOX-1423:
--------------------------------
After some investigation i now know the reason of this. It is because i have
opened a stream for text writing in the PDF then i wrote some text, then i
started drawing a rectangle without closing the stream. That's the main
problem. I have to close the stream before drawing anything.
example :
PDPage p = new PDPage();
PDPageContentStream ps= new PDPageContentStream( pdfFile, p );
ps.beginText();
ps.drawString( "Write some text" );
ps.fillRect(...);
ps.endText();
ps.close();
pdfFile.save( path );
I've also found this reported in here: http://forums.adobe.com/thread/464841
What do you think Andreas ?
> "An error exists on this page. Acrobat may not display the page correctly."
> ---------------------------------------------------------------------------
>
> Key: PDFBOX-1423
> URL: https://issues.apache.org/jira/browse/PDFBOX-1423
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 1.6.0
> Environment: Windows 7, WebLogic 10.3.0 and a jsp
> Reporter: wentao
> Attachments: generate_pdf.pdf
>
>
> after generate the pdf. Open it within Adobe Reader X has no problem, but if
> print it, a window pops up with "An error exits on this page. Acrobat may not
> display the page correctly. Please contact the person who created the PDF
> document to correct the problem", printed result looks ok.
> It seems there is no such popup message on Adobe Reader 9.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira