Article View: adobe.scripting.indesign
Article #15059How to prevent automatic page renumbering while creating a book?
From: Patrick_Langer
Date: Mon, 15 Dec 2003 19:46
Date: Mon, 15 Dec 2003 19:46
51 lines
2764 bytes
2764 bytes
I'm trying to create a book from documents in a specified folder. The script is basically the same as in the documentation. Meanwhile, the book has grown to some 90 documents with around 1200 pages totally. My problem is, everytime I append a new document, Indesign automatically starts renumbering the whole book which leads to the funny effect that even after all documents were appended to the book, Indesign takes another 4-5 hours to renumber the book (as it still has 20 documents or so go).
I tried to set automatic pagination to false but this had no effect. I can even see in the book palette's settings that it has been switched off but still ID is renumbering the pages for ages :-/.
Ok, here's my code:
on createbook()
--Add all of the InDesign files in a folder to
--the book content list of a new book file.
set myFolder to DDRpath & "/ID2Doc" as POSIX file
set myFileList to {}
tell application "Finder"
set myFiles to files of folder myFolder
repeat with myFileCounter from 1 to (count myFiles)
if file type of item myFileCounter of myFiles is "InDd" then
if (item myFileCounter of myFiles) is not "index.indd" then
copy (item myFileCounter of myFiles) as string to end of myFileList
end if
end if
end repeat
end tell
if (count myFileList) > 0 then
set myBookFile to (DDRpath & "/Dokubook.indb" as POSIX file) as string
tell application "InDesign 2.0.2"
set myBook to make book with data myBookFile
tell myBook
set properties to {automatic pagination:false}
end tell
--Add the files to the book content list in the reverse of the
--order in which they appear in the folder.
repeat with myFileCounter from (count myFileList) to 1 by -1
set thisfile to (item myFileCounter of myFileList) as string
tell myBook
make book content with data thisfile
end tell
end repeat
tell myBook
set properties to {automatic pagination:yes}
end tell
save to myBookFile
end tell
else
display dialog "No documents found."
end if
end createbook
Any idea? Olav?
Greets,
Patrick
Technical Details
Message-ID:
<2cceefec.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!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,13f13ad5fa156b8a,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-15 12:07:53 PST From: Patrick_Langer@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: How to prevent automatic page renumbering while creating a book? Message-ID: <2cceefec.-1@webx.la2eafNXanI> Date: Mon, 15 Dec 2003 11:46:02 -0800 Lines: 61 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit