Highlighted

How to find Popup annotation

Explorer ,
Feb 21, 2020

Copy link to clipboard

Copied

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

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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/

 

TOPICS
Acrobat SDK and JavaScript

Views

134

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to find Popup annotation

Explorer ,
Feb 21, 2020

Copy link to clipboard

Copied

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

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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/

 

TOPICS
Acrobat SDK and JavaScript

Views

135

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 21, 2020 0
Adobe Community Professional ,
Feb 21, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2020 0
Explorer ,
Feb 24, 2020

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 24, 2020 0
Adobe Community Professional ,
Feb 25, 2020

Copy link to clipboard

Copied

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/

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 25, 2020 1
sorin.n LATEST
Explorer ,
Feb 26, 2020

Copy link to clipboard

Copied

Thanks. Everything worked out. True, I had to figure out how to get the Popup Property.
Just in case, I will give all code. Perhaps someone will come in handy.

CosObj cosObj = PDAnnotGetCosObj(pdAnnot);
CosObj cosObj1 = CosDictGet(cosObj, ASAtomFromString("Popup"));
PDAnnot pdAnnot1 = PDAnnotFromCosObj(cosObj1);

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 26, 2020 0