Skip to main content
Participating Frequently
February 1, 2018
Question

Is there a way to draw JUST the annotations of a document without drawing the actual page?

  • February 1, 2018
  • 2 replies
  • 1237 views

I'm trying to draw the annotations of a document without actually drawing the page being annotated. I know there are methods like PDPageDrawContentsToMemoryEx() which draw the page to memory, is there any way to ignore the page, and just draw annotations?

This topic has been closed for replies.

2 replies

Legend
February 23, 2018

What "library" are you using? It is in the plug-in API, which is not a library of any kind.

Thom Parker
Community Expert
Community Expert
February 1, 2018

You want just the Annots to display on the main AVPageView?

It's possible you could interrupt the drawing process with the AVPageViewDrawProc Callback. 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participating Frequently
February 1, 2018

If possible, I'd like to implement a cleaner solution which doesn't have to start and interrupt a process which was never needed in the first place. Essentially, I'm looking for some way to, given a PDF page as input, solely draw the annotations of that document. Does the SDK support any straight forward ways of solving this problem? 

lrosenth
Adobe Employee
Adobe Employee
February 1, 2018

If you are drawing these to your own raster buffer, then you can do this by iterating over each annotation on the page (aka walk the Annots array), get the normal appearance dictionary for each, then use PDDrawPageOrCosObjectToBuffer to do just that.