Skip to main content
pravinp49289113
Participating Frequently
September 22, 2016
Question

get rect value of articlebox added in PDF javascript

  • September 22, 2016
  • 19 replies
  • 3911 views

Hi All,

Please help to get the rect(like x, y and width, height) values of article box use in PDF using acrobat SDK or API.

This topic has been closed for replies.

19 replies

pravinp49289113
Participating Frequently
October 21, 2016

Hi Joel,

Great!!..

We will use the evaluation version of the toolkit to run but it would be help if you JoelGeraci_Datalogics share same sample for Datalogics PDF .Net Interface.

Thanks Alot.!

JoelGeraci_Datalogics
Participating Frequently
October 21, 2016

I'm less familiar with the Datalogics Extensions than the Java Toolkit so I have someone looking at this. We did get your request though and it did get the attention of the Product Managers.

J-

Legend
September 27, 2016

Oh yes, sorry, Java. I'm no used to people mixing them up it seems that I've stopped noticing. Which is not good.

Legend
September 26, 2016

The earlier statement that Article bixes are not exposed to the JavaScript API.

try67
Community Expert
Community Expert
September 26, 2016

Was this a response to my reply? If so, you'll notice I didn't mention JavaScript (where I know it can't be done), but Java...

JoelGeraci_Datalogics
Participating Frequently
September 27, 2016

The Datalogics PDF Java Toolkit can get the rectangle for any annotation on the PDF page which would include article threads. As the name indicates, it's Java based.

Legend
September 22, 2016

This is interesting, but not a small project. You will need to

1. Learn C/C++.

2. Learn the plug-in architecture.

3. Be prepared to read thousands of pages of documentation.

4. Familiarize yourself with 32000-1, the PDF reference.

5. Implement based on the above.

6. Consider how the results are to reach out from the plug-in world (internal to Acrobat, not an executable).

Please don't ask us to show "samples", this is not a job for copy and paste.

Legend
September 22, 2016

Sorry I made a wrong assumption.

Legend
September 22, 2016

Ok, I'm assuming these are annotations rather than regular page contents. If so...

Each annotation has an object of type Annotation. Once you have this, there is a property that returns the coordinate rectangle (relative to the media box, not always the visible page).

So, how to get the annotation? You can use the Document.getAnnots method to return an array of all the annotations on the page. There will be annotations you didn't add of the wrong type, so always check the annotation type too.

pravinp49289113
Participating Frequently
September 22, 2016

Thanks for the Reply.

Would please help me with some startup code in js to get this.getAnnots.

lrosenth
Adobe Employee
Adobe Employee
September 22, 2016

Article boxes are NOT exposed to the Javascript API – only to the C/C++ APIs for plugin

Legend
September 22, 2016

How exactly was the "article box" added? are you writing a plugin, JavaScript or IAC client?

pravinp49289113
Participating Frequently
September 22, 2016

Yes, anythiing like javascript, IAC or plugin which will help to get co-ordinates of Article Box once add using Tools -> Document Processing -> Add Article Box

Legend
September 22, 2016

I mean, choose which of these you are using. I'm not going to type out three different answers.