Skip to main content
Boris56
Known Participant
February 21, 2020
Resuelto

How to find Popup annotation

  • February 21, 2020
  • 4 respuestas
  • 1062 visualizaciones

Hi,

I am creating a Highlight annotation. When you create this annotation automatically, as written in the documentation, an annotation of the Popup type is created. At some point, I need to delete the created annotation. In this case, I would like to delete the Popup annotation associated with the Highlight annotation. The documentation says that Highlight annotation is the parent of Popup annotations. How to find Popup annotation associated with her Highlight annotation?
Thanks

Este tema ha sido cerrado para respuestas.
Mejor respuesta de Thom Parker

Convert the pdAnnot into a CosDict Object, then get the Popup Property. This can then be converted into a PDAnnot.

 

PDAnnotGetCosObj()

PDAnnotFromCosObj()

 

Do you have PDFCanOpener? This tool will be a huge help.

http://www.windjack.com/product/pdfcanopener/

 

4 respuestas

Thom Parker
Community Expert
Community Expert
February 21, 2020

All anotations have a "Popup" property in the annotation dict. This is an indirect reference to Popup annotation.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Boris56
Boris56Autor
Known Participant
February 24, 2020

I have PDAnnot pdAnnot = PDPageGetAnnot (pdPage, i);
How can I get the "Popup" property in the annotation dict?
I did not find this in the API?

Thom Parker
Community Expert
Thom ParkerCommunity ExpertRespuesta
Community Expert
February 26, 2020

Convert the pdAnnot into a CosDict Object, then get the Popup Property. This can then be converted into a PDAnnot.

 

PDAnnotGetCosObj()

PDAnnotFromCosObj()

 

Do you have PDFCanOpener? This tool will be a huge help.

http://www.windjack.com/product/pdfcanopener/

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often