Skip to main content
jozefb58429255
Inspiring
October 16, 2017
Answered

Reader-enabled plugin with custom annotation handler

  • October 16, 2017
  • 1 reply
  • 1696 views

We've build an Acrobat plugin with custom annotation handler which works fine. Now we're looking at reader-enabled plugin and it seems like methods like PDRegisterAnnotHandler or PDGetAnnotHandlerByName are not available in reader at all. Is it really so? Or is there any way to enable/use these methods in Reader plugin?

Thanks

Jozef

This topic has been closed for replies.
Correct answer lrosenth

That’s not true – those are available in Reader

1 reply

lrosenth
Adobe Employee
lrosenthCorrect answer
Adobe Employee
October 16, 2017

That’s not true – those are available in Reader

jozefb58429255
Inspiring
October 16, 2017

Are you sure? As I look at the SDK...

in pdprocs.h there is:

UNPROC(void, PDRegisterAnnotHandler, (PDAnnotHandler handler))

while in pdcalls.h is:

#define NPROC(returnType, name, params) \

typedef ACCBPROTO1 returnType (ACCBPROTO2 *name##SELPROTO)params;

...

#if READER_PLUGIN

#define UNPROC(returnType, name, params)

#else

#define UNPROC NPROC

#endif

...

#define NOPROC(name)

#include "PDProcs.h"

#undef NPROC

this makes PDRegisterAnnotHandler undefined if (READER_PLUGIN==1)

or am I wrong?

lrosenth
Adobe Employee
Adobe Employee
October 16, 2017

Ignore that conditional – don't use it! It’s VERY old school. (I’ve been telling people to ignore it since around Acrobat 6)

Just call APIs as you need, they will throw if they don’t work in Reader.