Hello,
friends.
I want to make a
copy of the content of the abstract annotation, in particular text markup
annotation (let's say it is Rubber Stamp annotation). To do this, first I want
to extract data from annotation, and more particular - from annotation
appearance, which is stored in the annotation dictionary under entry "AP".
Internally it is also a dictionary, every entry of which is represented
as object stream.
I can
access such stream (for normal appearance) as described below
:
...
PdfObject
pdfObject;
...
// pdfObject is a
reference to annotation appearance object
PdfDictionary
appearanceDictionary = ((PdfDictionary)
PdfReader.getPdfObject(pdfObject));
PdfStream stream
= (PdfStream)PdfReader.getPdfObject(appearanceDictionary.get(PdfName.N));
Now I have PdfStream
object. How can I extract the very content of stream from there ? That is, I can
access all the fields of annotation appearance object stream dictionary, but I
cannot retrieve the stream itself. I want to get the content of stream to store
it in the container object for future recreation of full-featured annotation
from this conainer.
Can anyone tell
me, which classes should I use to achieve my goal
?