I’m trying to batch place PDFs into an Indesign doc from a folder of PDF’s then export it out as a PDF again. (I know sounds weird, but it does have a purpose).
This is what I got so far, but can’t seem to get the PDF to place into the Indesign Doc.
tell application "Finder"
set myFolder to (choose folder with prompt "Select the folder containing the PDFs you want to convert")
set myFiles to count every item of folder myFolder
set PDF_List to every item of folder myFolder as alias list
set folder_path to (choose folder with prompt "Select folder to Save PDF files") as string
tell application "Adobe InDesign CS3"
repeat with i from 1 to myFiles
activate
set page number of PDF place preferences to 2
set FormDoc to make document
tell document preferences of FormDoc
set {page height, page width} to {"12 in", "10"}
end tell
tell FormDoc
try
set LayerName to layer "Image layer" of FormDoc
on error
set LayerName to make layer with properties {visible:true, locked:false, name:"PDF"}
delete layer 2
end try
delete color "C=100 M=0 Y=0 K=0"
delete color "C=0 M=0 Y=100 K=0"
delete color "C=0 M=100 Y=0 K=0"
delete color "C=15 M=100 Y=100 K=0"
delete color "C=75 M=5 Y=100 K=0"
delete color "C=100 M=90 Y=10 K=0"
tell FormDoc
set pdf_page to place myFiles on page 1
move pdf_page to {"-.5", "-.5"}
set PDF_name to folder_path & myFiles & "_ WEB" & ".pdf"
tell FormDoc
export format PDF type to PDF_name using "LUXE Web PDF" without showing options
close FormDoc saving no
end tell
end tell
end tell
end repeat
end tell
end tell
Thanks
Tim