Copy link to clipboard
Copied
Hi everyOne
I'm accessing some data inside PDF doc trough Javascript for Automation of OSX
I can get the cropBox.... "var cropBoxx = acro.activeDoc.pages.cropBox();"
But how can i SET the cropbox
"acro.activeDoc.pages.cropBox.value='0, 1224, 192, 612';"...doesn't work
Maybe i'm far of the right way to send data to acrobat
Does someone can guide me
Thanks
ok i'v got it
At least i can set it to a specific page
acro.activeDoc.pages[0].cropBox = [0, 1224, 192, 612];
Copy link to clipboard
Copied
Not sure what this is, but it's not JavaScript...
Copy link to clipboard
Copied
In the (Javascript for Automation) of OSX
var cropBoxx = acro.activeDoc.pages.cropBox();
Return:
..
app = Application("Acrobat")
Application("Adobe Acrobat Pro").activeDoc.pages.cropBox()
--> [[0, 1224, 792, 612]]
..
If they call it (Javascript for Automation)
I guess is Javascript
Copy link to clipboard
Copied
Maybe, but it's not Acrobat JavaScript. Sounds like a scripting language of the OS itself.
Anyway, it seems from your example that you need to specify an array (or an array with an array as the first value).
Copy link to clipboard
Copied
No.. i know it's not Acrobat javascript
That's why i'v mentionned (Javascript for Automation of OSX)
The javascript side of Applescript ... since Yosemite
I'v tried every possiblilty of 0, 1224, 192, 612 or [0, 1224, 192, 612] or ([0, 1224, 192, 612])
it doesn't work
So maybe Someone else have played with (Javascript for Automation)
and have a answer
Thanks
Copy link to clipboard
Copied
ok i'v got it
At least i can set it to a specific page
acro.activeDoc.pages[0].cropBox = [0, 1224, 192, 612];
Find more inspiration, events, and resources on the new Adobe Community
Explore Now