Skip to main content
pravinp49289113
Participating Frequently
Sep 22, 2016 7:27 AM UTC
Question

get rect value of articlebox added in PDF javascript

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 is closed to new replies. Start a new post to keep the conversation going.

19 replies

pravinp49289113
Participating Frequently
Oct 21, 2016 6:48 AM UTC

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.!

Translate
JoelGeraci_Datalogics
Participating Frequently
Oct 21, 2016 4:20 PM UTC

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-

Translate
Legend
Sep 27, 2016 6:08 AM UTC

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

Translate
Legend
Sep 26, 2016 10:42 PM UTC

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

Translate
try67
Community Expert
Community Expert
Sep 26, 2016 11:23 PM UTC

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...

Translate
JoelGeraci_Datalogics
Participating Frequently
Sep 27, 2016 12:54 AM UTC

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.

Translate
Legend
Sep 22, 2016 12:28 PM UTC

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.

Translate
Legend
Sep 22, 2016 12:01 PM UTC

Sorry I made a wrong assumption.

Translate
Legend
Sep 22, 2016 10:25 AM UTC

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.

Translate
pravinp49289113
Participating Frequently
Sep 22, 2016 10:46 AM UTC

Thanks for the Reply.

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

Translate
lrosenth
Adobe Employee
Adobe Employee
Sep 22, 2016 11:18 AM UTC

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

Translate
Legend
Sep 22, 2016 7:53 AM UTC

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

Translate
pravinp49289113
Participating Frequently
Sep 22, 2016 8:55 AM UTC

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

Translate
Legend
Sep 22, 2016 9:07 AM UTC

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

Translate