[ 
https://issues.apache.org/jira/browse/PDFBOX-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14045802#comment-14045802
 ] 

Maruan Sahyoun commented on PDFBOX-2162:
----------------------------------------

The reason for the annotations to not showing up is that there is no Appearance 
stream (/AP) defined for them. The appearance defines how the annotation shall 
be rendered. It is an optional entry i.e. an annotation doesn’t need to have an 
appearance defined.

Now what Adobe Reader does it generates an appearance for annotations which do 
not have an appearance defined. That’s why it works after being saved by Adobe 
Reader. 

You can used PDFBox to generate an appearance stream for the annotations.


> annotation that highlights a text is not visible in image (converted from the 
> pdf)
> ----------------------------------------------------------------------------------
>
>                 Key: PDFBOX-2162
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2162
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 1.8.6
>         Environment: Java 1.7 and Eclipse Kepler
>            Reporter: Julien Savoyet
>             Fix For: 1.8.6
>
>         Attachments: myfile1.pdf, myfile1_re_saved.pdf
>
>
> Hi, I'm trying to convert in images (png or jpeg) a PDF file in which I've 
> added an annotation within each page through the PDAnnotationTextMarkup 
> object.
> I've used PDFImageWriter to achieve this convertion and the images are 
> correctly generated excepted that the annotation has disappeared.
> It seems that there is a mistake because if for example I open my PDF file 
> with acrobat reader and then I re-save it under a new PDF file and then I 
> relaunch my image conversion script with this latter one, the images 
> generated will this time contain the annotations.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to