RubberStamp Not Showing

33 views
Skip to first unread message

Jonathan Lam

unread,
Aug 1, 2014, 4:34:03 PM8/1/14
to pdfne...@googlegroups.com
Hello,

I'm adding a rubber stamp to a pdf, but it is only showing a box with an X as the icon as opposed to the right stamp icon.  I'm following the code in AnnotationTest.java as so:

pdftron.PDF.Annots.RubberStamp stamp = pdftron.PDF.Annots.RubberStamp.create(doc, new Rect(30, 30, 300, 200));
stamp.setIcon("Draft");
first_page.annotPushBack(stamp);

Any ideas why it is doing this?

Thank you,
Jonathan

Ryan

unread,
Aug 1, 2014, 8:14:14 PM8/1/14
to pdfne...@googlegroups.com
According to the PDF spec, the appearance of stamps such as Draft, can be left up to the PDF viewer. However, not all viewers provide this mechanism.

For example, in Acrobat 9.5 I see the Draft stamp, but using Reader XI nothing appears.

So two things I would recommend...

stamp.setIcon(RubberStamp.e_Draft); // this is an int, not a string.

call

stamp.RefreshAppearance(); // before saving.

This will generate an appearance, so it will look the same in all viewers.

Reply all
Reply to author
Forward
0 new messages