Article View: adobe.scripting.indesign
Article #16245Re: AS - placing multiple page PDFs
From: Stephen_Moye
Date: Fri, 03 Oct 2003 19:36
Date: Fri, 03 Oct 2003 19:36
28 lines
1665 bytes
1665 bytes
I tried a simple solution, and it does not work. In the code below, I always end up at the error condition without having placed any PDF pages, and never hear the 3 beeps (a simple debugging tool). I'm using the "try" construct in order to avoid having to know beforehand how many pages are in the PDF.
tell application "Finder"
activate
set myPDF to (choose file with prompt �
"Locate the PDF to be imported into InDesign..." of type ("PDF "))
end tell
tell application "InDesign 2.0.2"
activate
make document
set myDoc to active document
try
repeat with myPage from 1 to 1000
tell document myDoc
make new page at end of myDoc
tell PDF place preferences
set page number to myPage
end tell
place myPDF on myPage of myDoc
beep 3
end tell
end repeat
on error
display dialog "What is happening here?"
end try
display dialog "Transferred " & ((myPage) as string) & " pages."
end tell
Technical Details
Message-ID:
<2ccd98b9.3@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccd98b9.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,2ec79d4aedb53663 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-10-03 12:37:51 PST From: Stephen_Moye@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: AS - placing multiple page PDFs Message-ID: <2ccd98b9.3@webx.la2eafNXanI> Date: Fri, 3 Oct 2003 12:36:54 -0700 References: <2ccd98b9.-1@webx.la2eafNXanI> Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit