Article View: adobe.scripting.indesign
Article #16287AS - placing multiple page PDFs
From: Rich_Carroll
Date: Wed, 01 Oct 2003 18:24
Date: Wed, 01 Oct 2003 18:24
38 lines
1783 bytes
1783 bytes
Is there any way within InDesign to determine if a PDF is multi page, and if so how would you place subsequent pages of the same PDF?
set targetFolder to choose folder with prompt "Select folder of PDF files for book."
set targetFiles to list folder targetFolder
set targetFiles2 to {}
tell application "Finder"
repeat with i in targetFiles
if i ends with ".pdf" then
set targetFiles2 to targetFiles2 & i
end if
end repeat
end tell
tell application "InDesign 2.0.2"
set myDoc to active document
repeat with i in targetFiles2
set myName to i as string
set myPath to (targetFolder as string) & i as alias
make new page at end of myDoc
set myPage to result
tell myDoc
set applied master of myPage to (master spread "A-Master")
tell myPage
set myTextFrame to master page item 2
set myFrame to master page item 3
tell myTextFrame
set contents of myTextFrame to myName
end tell
tell myFrame
place myPath on myFrame
fit myPath given proportionally
fit myPath given center content
end tell
end tell
end tell
end repeat
end tell
Sorry for the double post.
Technical Details
Message-ID:
<2ccd98b9.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,2ec79d4aedb53663,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-10-01 11:38:02 PST From: Rich_Carroll@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: AS - placing multiple page PDFs Message-ID: <2ccd98b9.-1@webx.la2eafNXanI> Date: Wed, 1 Oct 2003 11:24:07 -0700 Lines: 40 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit