You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Constantine Dokolas <cd...@gmail.com> on 2018/06/08 14:31:41 UTC

Custom annotations (custom appearance stream)

I'm trying to add a custom annotation (i.e. with a custom appearance stream
that defines exactly what I want to show) to a page. I'm confused on which
PDAnnotation class to use and I can't find anything related in the spec.
I've used RubberStamp and SquareCircle (as "Square") and I get to see what
I want but, to add to my confusion, any kind of edit from within Acrobat
Reader destroys the rendering of the annotation (turns it to a box with an
X joining the corners). What's going on?

Thanks in advance,
Constantine
-- 
There is a computer disease that anybody who works with computers knows
about. It's a very serious disease and it interferes completely with the
work. The trouble with computers is that you 'play' with them!
- Richard P. Feynman

Re: Custom annotations (custom appearance stream)

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 11.06.2018 um 10:29 schrieb Constantine Dokolas:
> It seems that setting the "Name" entry for the annotation (setName) makes
> Acrobat behave better. Evidently Acrobat is determined in finding out the
> icon representing the rubber stamp and only then allowing for the AP to
> override that? (i.e. not specifying which rubber stamp throws off Acrobat's
> logic).

According to the PDF specification, the /AP comes first when displaying. 
But it doesn't say anything about when the annotation is moved / resized.

Tilman

>
> Constantine
>
> On Sat, Jun 9, 2018 at 9:36 AM Tilman Hausherr <TH...@t-online.de>
> wrote:
>
>> My theory on the rubber stamp annotation is that Adobe tries to
>> reconstruct the AP from the non AP data but it can't because the name
>> isn't one that Adobe knows.
>>
>> On the square annotation I'd need to see the PDF. That one is rather
>> easy, it just needs the rectangle and the width and the color.
>>
>> Tilman
>>
>> Am 08.06.2018 um 16:31 schrieb Constantine Dokolas:
>>> I'm trying to add a custom annotation (i.e. with a custom appearance
>> stream
>>> that defines exactly what I want to show) to a page. I'm confused on
>> which
>>> PDAnnotation class to use and I can't find anything related in the spec.
>>> I've used RubberStamp and SquareCircle (as "Square") and I get to see
>> what
>>> I want but, to add to my confusion, any kind of edit from within Acrobat
>>> Reader destroys the rendering of the annotation (turns it to a box with
>> an
>>> X joining the corners). What's going on?
>>>
>>> Thanks in advance,
>>> Constantine
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>> --
> There is a computer disease that anybody who works with computers knows
> about. It's a very serious disease and it interferes completely with the
> work. The trouble with computers is that you 'play' with them!
> - Richard P. Feynman
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Custom annotations (custom appearance stream)

Posted by Marc Kaufman <ma...@eeph.com>.
The most Acrobat-friendly of handling custom appearances in an 
annotation is to use the Button type.


Re: Custom annotations (custom appearance stream)

Posted by Constantine Dokolas <cd...@gmail.com>.
It seems that setting the "Name" entry for the annotation (setName) makes
Acrobat behave better. Evidently Acrobat is determined in finding out the
icon representing the rubber stamp and only then allowing for the AP to
override that? (i.e. not specifying which rubber stamp throws off Acrobat's
logic).

Constantine

On Sat, Jun 9, 2018 at 9:36 AM Tilman Hausherr <TH...@t-online.de>
wrote:

> My theory on the rubber stamp annotation is that Adobe tries to
> reconstruct the AP from the non AP data but it can't because the name
> isn't one that Adobe knows.
>
> On the square annotation I'd need to see the PDF. That one is rather
> easy, it just needs the rectangle and the width and the color.
>
> Tilman
>
> Am 08.06.2018 um 16:31 schrieb Constantine Dokolas:
> > I'm trying to add a custom annotation (i.e. with a custom appearance
> stream
> > that defines exactly what I want to show) to a page. I'm confused on
> which
> > PDAnnotation class to use and I can't find anything related in the spec.
> > I've used RubberStamp and SquareCircle (as "Square") and I get to see
> what
> > I want but, to add to my confusion, any kind of edit from within Acrobat
> > Reader destroys the rendering of the annotation (turns it to a box with
> an
> > X joining the corners). What's going on?
> >
> > Thanks in advance,
> > Constantine
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
> --
There is a computer disease that anybody who works with computers knows
about. It's a very serious disease and it interferes completely with the
work. The trouble with computers is that you 'play' with them!
- Richard P. Feynman

Re: Custom annotations (custom appearance stream)

Posted by Tilman Hausherr <TH...@t-online.de>.
My theory on the rubber stamp annotation is that Adobe tries to 
reconstruct the AP from the non AP data but it can't because the name 
isn't one that Adobe knows.

On the square annotation I'd need to see the PDF. That one is rather 
easy, it just needs the rectangle and the width and the color.

Tilman

Am 08.06.2018 um 16:31 schrieb Constantine Dokolas:
> I'm trying to add a custom annotation (i.e. with a custom appearance stream
> that defines exactly what I want to show) to a page. I'm confused on which
> PDAnnotation class to use and I can't find anything related in the spec.
> I've used RubberStamp and SquareCircle (as "Square") and I get to see what
> I want but, to add to my confusion, any kind of edit from within Acrobat
> Reader destroys the rendering of the annotation (turns it to a box with an
> X joining the corners). What's going on?
>
> Thanks in advance,
> Constantine



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org