Article View: adobe.scripting.indesign
Article #16255[AS] Appropriate ID methods for catalog generation from database
From: david hugh
Date: Fri, 26 Sep 2003 21:59
Date: Fri, 26 Sep 2003 21:59
31 lines
3137 bytes
3137 bytes
Greeting - I've dug around in the archive and haven't found any answers to my particular troubles... and I'm beginning to think that my approach may be my problem.
Environment - Mac OS X 10.2.6, InDesign 2.0, FileMaker
I am an experienced AppleScripter and familiar with pre-press, but a novice WRT InDesign. I am creating PDFs from a database and would like to auto-flow them into a new InDesign document.
In looking at InDesign, I discovered that with the cursor in a 2-column text box, I can File>Place... a pdf into that text box. If I File>Place... again, the first PDF slides down to accomodate the second. Brilliant, thinks me - just tell the text frame to place my pdfs in reverse order and bang zoom, done and leave the office early.
No dice. When I tell the text frame to place the pdf, the text frame ceases to be a text frame anymore - it reports that it is now a rectangle. When quizzing the rectangle about any text frames it may contain, it responds blankly, with the equivalent of "WHAT text frame?" As a result, any further place commands upon this object replace the current contents, which does me no good.
here's a sample of this behavior:
tell application "InDesign 2.0"
set myDoc to make new document
set myPage to page 1 of myDoc
tell myPage
set theBox to make text frame with properties {geometric bounds:{3, 3, 63, 48}}
display dialog "the text frame is now: " & (content type of theBox) as string
tell theBox
place "Full:path:to:some:simple.pdf"
end tell
display dialog "the text frame is now: " & (content type of theBox) as string
end tell
end tell
If you run this script (and give it a valid path) you will note that the box starts off as a text box, and ends up as a graphic. I double-checked the results of manually File>Place..-ing items into a text box, and the silly thing stays as a text box the entire time.
So - should I ask how to make this work or if I'm even heading in the right direction? I really like the idea of simple iteration over a folder of PDFs and having everything reflow automagically, rather then having to test for reflow conditions, etc, etc.
Thanks in advance, I'll prolly clean and post the core bits of whatever I'm given, presuming I can get it working.
David
Technical Details
Message-ID:
<2ccd8d01.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!205.215.62.125.MISMATCH!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,a6a6be3785607976,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-09-26 15:08:05 PST From: "david hugh" <davidr@drbott.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!205.215.62.125.MISMATCH!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: [AS] Appropriate ID methods for catalog generation from database Message-ID: <2ccd8d01.-1@webx.la2eafNXanI> Date: Fri, 26 Sep 2003 14:59:40 -0700 Lines: 54 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit