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``));
Any ideas why it is doing this?
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.
stamp.RefreshAppearance(); // before saving.
This will generate an appearance, so it will look the same in all viewers.