You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by James <ki...@gmail.com> on 2010/02/08 22:34:30 UTC

Replacement Text Annotations

I was wondering if anyone has had any experience working with Replacement
Text annotations with PDFBox.  I am currently working on a project which
involves, in part, transferring annotations from one PDF to another.  The
PDFs are actually the same PDF, the only difference is in the annotations.
I am having an issue when it comes to Replacement Text annotations, because
they come up in PDFBox as type PDAnnotationUnknown and when copied over, the
only thing which is copied is the text.  The popup is lost as well as the
line which crosses out the text which the annoter (is that a word?) intends
the text to be a replacement of.

In contrast, everything works great with annotations created using the
regular Note Tool.  For each note PDFBox finds 2 annotations, one of type
PDAnnotationText, which is the actual comment and one of PDAnnotationPopup
which is the popup that the text is contained in.  In addition, you can
easily find the relation between these two annotations by using getParent
from PDAnnotationPopup or getPopup from PDAnnotationText.  For Replacement
Text annotations, only a single annotation is found by PDFBox, of type
PDAnnotationUnknown.

Any information anyone can provide on this would be appreciated.  My only
thought is that perhaps this is a newer feature which is not really
supported by PDFBox yet.

Re: Replacement Text Annotations

Posted by Kevin Brown <kb...@gmail.com>.
Did you have any luck with this, James?

On Mon, Feb 8, 2010 at 4:34 PM, James <ki...@gmail.com> wrote:

> I was wondering if anyone has had any experience working with Replacement
> Text annotations with PDFBox.  I am currently working on a project which
> involves, in part, transferring annotations from one PDF to another.  The
> PDFs are actually the same PDF, the only difference is in the annotations.
> I am having an issue when it comes to Replacement Text annotations, because
> they come up in PDFBox as type PDAnnotationUnknown and when copied over,
> the
> only thing which is copied is the text.  The popup is lost as well as the
> line which crosses out the text which the annoter (is that a word?) intends
> the text to be a replacement of.
>
> In contrast, everything works great with annotations created using the
> regular Note Tool.  For each note PDFBox finds 2 annotations, one of type
> PDAnnotationText, which is the actual comment and one of PDAnnotationPopup
> which is the popup that the text is contained in.  In addition, you can
> easily find the relation between these two annotations by using getParent
> from PDAnnotationPopup or getPopup from PDAnnotationText.  For Replacement
> Text annotations, only a single annotation is found by PDFBox, of type
> PDAnnotationUnknown.
>
> Any information anyone can provide on this would be appreciated.  My only
> thought is that perhaps this is a newer feature which is not really
> supported by PDFBox yet.
>