Get position of Acrobat and InDesign document

Hi everybody,
let’s say I have an InDesign document “myDoc.indd” exported in PDF as “myDoc.pdf”.
I’d like to get position of the document “myDoc.pdf” in Acrobat and report the same position of the same document (“MyDoc.indd”) in Indesign. So that positions of my 2 documents on my screen are the same…

Something like :


tell application "Adobe Acrobat Pro"
	tell active doc
get position of document --returns coordinates, bounds of document
end tell
end tell

Do you know how it is possible ?
Thanks !

Hi alitaliano,

Firstly is seems as tho the way we get the bounds of active windows in Acrobat and InDesign differ!

Then when we get these results, the order in which they are presented to us is in a different order!!

Acrobat delivers its bounds as x,y,w,h
Whereas InDesign gives them as y,x,h,w

This script takes the bounds of the Acrobat window and applies them to InDesign:-


tell application "Adobe Acrobat Professional"
	activate
	set acroBounds to bounds of active doc
	set xBound to item 1 of acroBounds
	set yBound to item 2 of acroBounds
	set wBound to item 3 of acroBounds
	set hBound to item 4 of acroBounds
end tell
tell application "Adobe InDesign CS3"
	activate
	set bounds of active window to {yBound, xBound, hBound, wBound}
end tell

Hope this helps.

Thank you intoto for your answer.
But I would like to get bounds of the document contained by the window or, if you prefer, the coordinates of the displayed document.
Let’s say I have created a 20X30 cm document in Indesign. I zoom in at 400 % and my screen now display it bigger. I’d like to display it the same way (same coordinates and size, same view) when exported as PDF in Acrobat. By the way, if you save a document in Indesign it saves the view too.
Thank you for your help!

Hi,

You can get (and set) the zoom % in both InDesign and Acrobat with:

tell application "Adobe InDesign CS3"
	activate
	get zoom percentage of layout window 1
end tell

and

tell application "Adobe Acrobat Professional"
	activate
	get zoom factor of PDF Window 1
end tell

But looking at the Dictionaries for both of these applications, I’m sure the ‘bounds’ only refers to the position of the Application window in relation to the screen and not the location of the page within the window!