Under Acrobat, I have a custom PDAnnotHandler subclass which defines the print appearance of an annotation via callback. There is no way to register a PDAnnotHandler under Reader however. Currently, I can update the AP/N COS object directly by grabbing the DocWillPrint callback. (I think its an AV method but don't remember exactly) and writing directly to the PDF file. The downside to this is that when the user goes to close the file afterwards they are asked to save the document.
The question then would be: Is there any way to define the appearance of an annotation in Reader without actually making a change to the PDF itself? I would be satisfied as long as the user isn't asked to save. i.e. If I could write the CosObj, print, then undo the change that would be fine. Or if there was any way to define the print appearance directly without writing it that would be great too. Any pointers would be appreciated.
PDRegisterAnnotHandler is allowed only by Acrobat and PDFL. (I do have an AVAnnotHandler, but there is no way to define a print appearance there.) Just for kicks, I gave it a shot and get
error C2065: 'PDRegisterAnnotHandlerSELPROTO' : undeclared identifier
I’m not sure which define you’re referring to. Right now I build two separate .API files from the same source, where some code is enclosed in #ifndef READER_PLUGIN statements to allow for building on Reader. Other than that I don’t do anything special regarding Reader.
Bump. Could you clarify which define you are referring to? I really would like to get print support for my annotation that is more than just the static AP stream that I store in the PDF upon annotation insertion.
Europe, Middle East and Africa