Skip to main content
Participating Frequently
June 11, 2019
Question

How to get page count of each annotation attachment programmatically

  • June 11, 2019
  • 2 replies
  • 727 views

I have a number of annotation attachments in a pdf form. I would like to get the page count of each annotation attachment(mostly pdf). Is there any way to get it.

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
June 11, 2019

What exactly do you mean by the "page count of each annotation"? 

Do you mean you have Annotations of the Attachement Type? 

So do you mean you want to get the number of Attachment Annotations on each page?

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participating Frequently
June 12, 2019

What i am looking to get is the total number of pages of each of the annotations(pdf files) of the type " annotation attachment" which are attached to a pdf file. Is there any way to get it. Getting the annotation count of each page to which the annotation is attached is not useful for me.

Thom Parker
Community Expert
Community Expert
June 12, 2019

My misunderstanding.  You want the page count of the PDF attachment. Unfortunately the JavaScript model does not provide the same access for an attachment annotation as it does an actual file attachment. The frustrating bit is that from a UI perspective they look the same, but in JavaScript they are different things. These files cannot be opened from JavaScript.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
June 11, 2019

No.