I’ve been working on this script to create single page PDF’s out of Indesign CS3.
It makes the PDF’s fine but it won’t separate them into single pages.
I end up with several PDF’s with all the pages in them. Can’t figure it out.
Here is what I got so far…
Thanks
tell application "Adobe InDesign CS3"
activate
tell (active document) to set {file_name, doc_pages, page_numbers} to {name, pages, name of pages}
set pdf_style to name of PDF export presets
set export_style to (choose from list pdf_style with prompt "Select PDF Export Preset") as string
if export_style is "false" then return
set folder_path to (choose folder with prompt "Select folder to Save PDF files") as string
set oldPref to page numbering of general preferences
set page numbering of general preferences to absolute
set pagesToPrint to (choose from list page_numbers with prompt "Choose Pages to PDF" with multiple selections allowed)
if pagesToPrint is false then return
repeat with anItem in pagesToPrint
if length of anItem is 4 then
set new_number to contents of anItem
else
set new_number to text -3 thru -1 of ("00" & anItem)
end if
set PDF_name to folder_path & file_name & "_" & new_number & ".pdf"
set page range of PDF export preferences to (anItem as string)
tell active document to export format PDF type to PDF_name using export_style without showing options
end repeat
set page numbering of general preferences to oldPref
beep
display dialog "Your PDFs are Done" buttons {"Done"} default button 1
end tell