jtoshkov
Technical User
- Dec 28, 2007
- 2
Hello Everyone,
I am trying to place a multipage PDF in a document with facing pages using and Applescript. I don't want the place point to be exactly at the top left so I enter place point coordinates but they only work for the right hand side pages. My question is how to make them alternate? Or maybe there is another way to do it without a specified place point. I will appreciate any input. Thanks!
Here is what I am using:
tell application "Adobe InDesign CS3"
set myDone to false
set PDF crop of PDF place preferences to crop PDF
set myCounter to 1
repeat until myDone is true
tell myDocument
if myCounter > 1 then
set myPage to make page at after myPage
end if
end tell
set page number of PDF place preferences to myCounter
get page number of PDF place preferences
tell myPage
set myPDFPage to place myPDF place point {0.125, 0}
set myPDFPage to item 1 of myPDFPage
end tell
get properties of PDF attributes of myPDFPage
if myCounter = 1 then
set myFirstPage to page number of PDF attributes of myPDFPage
else
if page number of PDF attributes of myPDFPage = myFirstPage then
tell myPage to delete
set myDone to true
end if
end if
set myCounter to myCounter + 1
end repeat
end tell
I am trying to place a multipage PDF in a document with facing pages using and Applescript. I don't want the place point to be exactly at the top left so I enter place point coordinates but they only work for the right hand side pages. My question is how to make them alternate? Or maybe there is another way to do it without a specified place point. I will appreciate any input. Thanks!
Here is what I am using:
tell application "Adobe InDesign CS3"
set myDone to false
set PDF crop of PDF place preferences to crop PDF
set myCounter to 1
repeat until myDone is true
tell myDocument
if myCounter > 1 then
set myPage to make page at after myPage
end if
end tell
set page number of PDF place preferences to myCounter
get page number of PDF place preferences
tell myPage
set myPDFPage to place myPDF place point {0.125, 0}
set myPDFPage to item 1 of myPDFPage
end tell
get properties of PDF attributes of myPDFPage
if myCounter = 1 then
set myFirstPage to page number of PDF attributes of myPDFPage
else
if page number of PDF attributes of myPDFPage = myFirstPage then
tell myPage to delete
set myDone to true
end if
end if
set myCounter to myCounter + 1
end repeat
end tell