I have several documents inside an InDesign book. Is there a way that they can be exported into one single PDF file?
Here is the script I am using:
for (var i = 0; i < data.chapters.length; i++)
show_list.children.selection = i; show_list.show ();
DocName = data.chapters[i].name;
app.open (data.chapters[i], false);
f = new File (data.chapters[i].fullName.replace (/indd$/, "pdf"));
app.pdfExportPreferences.pageRange = PageRange.allPages;
app.documents.itemByName(DocName).exportFile(ExportFormat.pdfType, f, false, data.preset);
The script exports them to PDF but each document is a separate PDF file.
Any hep would be appreciated. Thanks.
Check out Book.exportFile()...
I wrote that script because InDesign's Book doesn't have an option to export book files individually. Instead, Book export always gives you one combined file. So either you don't need a script (simply export the book in the UI) or, as Harbs said, all you need to do is find the script command for exporting a book.
Thanks Harbs and Peter! I was able to use book.exportFile for my script.
And Peter your scripts have been a great help.