I have a bunch of InDesign Files in a folder and I have created on watch folder using Distiller. Now I want a script which generates PS files in the watch folder so that the PDF will get generated. Apart from that if the fonts are missing of any file that should be recorded in a report file.
Below I am explaining it:
Ask for source folder.
Ask for destination folder.
Open each files and check for missing fonts.
If the fonts are missing then write the missing font name in a master log report file.
If no missing fonts were there, then generate PS file in the destination folder.
Note: Report file should contains only unique name and it is a consolidate report for the all files in the folder.
I will keep updated as I will proceed.
Regards,
Pooja
Hi Pooja,
the script below does pretty much what you want but for the error on missing fonts. The way I’ve got around this in the past is to open the document without displaying any missing font dialogs and then when the doc is open check the font status, if fonts are missing then close the doc and move it into an error folder. I’ve never created a log file for it before but I’m sure this can be done. Have a go with the script below and if you want to progress any further with this let me know.
set source_folder to choose folder with prompt "Select folder containing Indesign Documents"
set Output_folder to choose folder with prompt "Select folder to print PostScript to"
tell application "Finder" to set item_list to every item of source_folder
repeat with this_item in item_list
set doc_kind to kind of (info for this_item as alias)
if doc_kind contains "Indesign" then
tell application "Adobe InDesign CS2"
open this_item
set doc_name to name of active document
set PS_filename to characters 1 thru -6 of doc_name & ".ps" as string
set PS_Path to (Output_folder as string) & PS_filename
set print file of printer preset "postscript" to ("" & PS_Path)
print document 1 using "postscript" without print dialog
close document 1 saving no --> or yes depending on personal preference
end tell
end if
end repeat
Hi Pooja,
if just want to ignore missing images and fonts then just add this
set user interaction level of script preferences to never interact
Insert this after the
tell application "Adobe InDesign CS2"
line and this will prevent Indesign prompting you when ther’s a problem. It might a good ideas to set Indesigns preferences back at the end of the script to
set user interaction level of script preferences to interact with all
otherwise when you use Indesign next you’ll not be alerted to any problems.
P.S. There is a way to create a report from Indesign if fonts or images are missing to a text file, if you’d still like to do this I may be able to help.
Thanks,
Nik