I see that annot-pro supports customStamp
:
However, it also seems to require Adobe Distiller, and I want to use pdftex/pdflatex/lualatex.
pdfcomment seems to support most annotations, but seems to only support built-in appearances. (Perhaps I'm missing something, though, and custom appearances are just not documented?)
The pdfmark documentation on ANNotations says:
In addition to these types, annotations with unrecognized
Subtype
values, called custom annotations, are supported. Custom annotations can contain, in addition to theRect
andSubtype
keys, arbitrary key-value pairs. and
Key Type Semantics Action(PDF key = A ) name or dictionary An action to be performed when the annotation is activated. See Actions for details. For links, this key is not permitted if the Dest key is present. AP dictionary An appearance dictionary specifying how the annotation is presented visually. See the PDF Reference for details.
The PDF Reference says about appearance streams:
12.5.5 Appearance Streams
Beginning with PDF 1.2, an annotation may specify one or more appearance streams as an alternative to the simple border and colour characteristics available in earlier versions. Appearance streams enable the annotation to be presented visually in different ways to reflect its interactions with the user. Each appearance stream is a form XObject (see 8.10, “Form XObjects”): a self-contained content stream that shall be rendered inside the annotation rectangle.
So it seems like it should be possible to include arbitrary LaTeX content (as long as it gets stored as a "Form XObject"? What is that?) as the stamp. How do I get this to work? / How can pdfcomment
be extended (or another package be used) to allow arbitrary LaTeX content at the annotation, in a way that doesn't require Adobe Distiller?
(Ultimately, I want to hack a version of the picture
environment that renders every \put
as a separate annotation, to allow dragging in supported PDF editors, cf Turning Adobe Reader into an interactive picture editor?. But this question is just about the custom appearances of annotations.)