Is there a script that I can use to print pages in one folder? If I have 30 files that need to be printed and dont want to waste my time just clicking and printing…this happends a lot, any ideas?
Thank you for any help
Is there a script that I can use to print pages in one folder? If I have 30 files that need to be printed and dont want to waste my time just clicking and printing…this happends a lot, any ideas?
Thank you for any help
This kind of drolet/application might be the one that you are looking for:
Kari
This is great stuff! But I am not able to get it to work, almost whole month I am trying to change something and still it does not react
Here is a minor modification to Kari’s code that works for me as a droplet application. Make sure you change the text “My Printer Preset” to a printer preset name in InDesign CS. Save the script as an application and you should be able to drop a folder on it and all ID files will print. iolaire
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]
Hey Thanks a BUNCH! I did not know I need to drop folder into application, gush such a mistake, however it works great thanks for all your help!!! I bet this can be really easy modified to create PDF files, do you know what is the command to export to pdf? and save it in folder?
Thanks for all your time
This should save it as a PDF, you will need to change “myTestPreset” to an existing PDF export style. And “Macintosh_OS_X:” to your output path in the format “ComputerName:Folder1:Folder2:”. Right now the script is saving the file with the name like doc1.indd.pdf - I’ll leave it up to you to figure out how to script the removal of that via AppleScript - here is a long solution: http://www.apple.com/applescript/guidebook/sbrt/pgs/sbrt.07.htm
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]
Make sure you grab the TnDesign Scripting Tutorial Chapter - Working with Documents in AppleScript documentation at: http://partners.adobe.com/asn/indesign/scripting.jsp
Good luck,
iolaire
Hey Thanks a lot! however it is not working for some reason… there is a message:Indesign CS doesn’t understand the <> message.
I believe it is referring to command:
export format PDF type to…
Do you know why it is??
Thanks
Please ignore my previews message, everything works fine!! I just wrote wrong pdf export preset, sorry, AND THANK YOU FOR SUCH A GREAT AND USEFULL SCRIPT
This script is really great - it’s exactly what I needed… except I get an error “AppleEvent timed out” after only one file gets exported. Any ideas?
Maybe your file is large to it times out waiting for ID to get done exporting the PDF. Try changing this line:
export format PDF type to "Macintosh_OS_X:" & myName & ".pdf" using myPreset without showing options -- set path here format ComputerName:Folder1:Folder2:......:FileName.pdf
to something like:
with timeout of 100 seconds -- you can plan around with the time to fit your needs
export format PDF type to "Macintosh_OS_X:" & myName & ".pdf" using myPreset without showing options -- set path here format ComputerName:Folder1:Folder2:......:FileName.pdf
end timeout
Good luck, iolaire
The time InDesign takes to exports a PDF varies a lot depending on the nature of the document and the PDF settings. For example, check the resolution of your images and see if the PDF format will require down-sampling. Also look out for page items with oppacity set less than 100%. The transparency flattening process can take a good bit of time.
I have single spreads that take ID several minutes to generate a PDF – even on a G5.
I keep getting the “InDesign CS got an error: Can’t make some data into the expected type.” message when I try to save using the above script. I removed the sections that make it a droplet so it will work from within InDesign. I tried a few different configs of destination folders as well but with no luck. I want to use this script (or one like it) to export a “Screen” and “Press” PDF and export as a JPEG. The Applescript dictionary for Indesign doesn’t help me much. I don’t care right now if the script is redundant as long as it works.
tell application “InDesign CS”
set user interaction level to never interact
–repeat with i from 1 to count of idFiles
–open item i of idFiles
tell document 1
set myPreset to “print” – name of pdf export style to use
set myName to the name -- name includes .indd should remove at some point
export format PDF type to "creative 2's computer/creative 2 HD/desktop/" & myName & ".pdf" using myPreset without showing options -- set path here format ComputerName:Folder1:Folder2:......:FileName.pdf
close without saving
end tell
--end repeat
set user interaction level to interact with all
end tell
Please help.
The simple example of how to export to pdf outside of the droplet can be found at http://partners.adobe.com/asn/indesign/scripting.jsp.
The documentation at this site also includes the following (Apple Script, VBScript, and JavaScript):
Create a new document
Close a document
Save a document
Set document page size
Define bleed and slug areas
Specify page columns and margins
Change the size of the pasteboard
Create guides
Use InDesign’s baseline and document grids
Change measurement units and ruler origin
Define and apply document presets
Set up master pages
Set text defaults
Add XMP metadata (“file info”)
Create a document template
Print a document
Export a document as PDF
Export the pages of a document as EPS
Thanks to Olav Kvern at Adobe.
Good luck,
iolaire
I still get the same error even using the sample applescripts you suggested. The offending lines seem to be with my file location.
export format PDF type to “yukino:test.pdf” using “myTestPreset” without showing options
export format PDF type to “computer name:hard drive name:users:username:desktop:test.pdf” using “myTestPreset” without showing options
I’ve also tried to use just with no luck
export format PDF type to “desktop:test.pdf” using “myTestPreset” without showing options
I’ve tried using slashes like I’ve used in a script for Transmit that changes where it uploads files from and that works fine.
Try this one, changing Macintosh_OS_X to the name of your hard drive?
tell application "InDesign CS"
tell active document
export format PDF type to "Macintosh_OS_X:test.pdf" using "[Print]" without showing options
end tell
end tell
Its using the print default PDF export preference. Also how are you running it? I’m just running this via script editor. I’m wondering if maybe you don’t have a preset named - myTestPreset.
Thanks,
iolaire
I changed what you said to “Creative2 HD” which is the name of my drive. OSX says my “computer” is named “Creative 2’s Computer” so I tried that as well. I also tried just “Desktop” which applescript is supposed to auto recognize. No matter what I get the error “InDesign CS got an error: Can’t make some data into the expected type.”
I had tried using the presets also “eBook”,“eBook.joboptions”, “Print”, “Press”, etc. Both just in quotes and quotes within brackets. If I use just [eBook] it says that the variable is undefined. If I use [print] it will open a print dialog box.
I was getting the undefined error if I entered “Print” instead of “[Print]”. So I would guess that your problem is related in some way to the export presets.
Are you testing the 5 lines I posted last night or are you still trying to modify your code? I’d suggest working with the 5 I provided as there is less room for error.
Otherwise - do other scripts work for you? What version of InDesign and OS X are you using? Does the droplet code work for you?
iolaire
Wow I feel realllllly stupid now :oops: It turns out that there was an extra space in the name of my hard drive that I didn’t expect or incorporate into the script. Instead of “Creative2 HD” I had typed in “Creative2 HD” like a normal person. Why anyone would name the drive the way they did is a mystery but at least I got it straightened out. I appreciate all the help. THANKS!! Works like a charm and reads all the presets.
Applescript should really work on that error message though… it had nothing to do with the type and everything to do with the location???
Can someone tell me why this won’t work?
tell active document
set docName to full name
export format PDF type to docName & ".pdf"
end tell
I get the same data type error. I just want the pdf to save to the same location as the indd file, which would be a relative not absolute location. I’ve tried using file path and name with the same result.
It looks like you need to tell export PDF which presets to use when exporting. But as you can see I’m not the expert here. But it is a place to start. Use the 5 line code referenced above as a basis… see if that works than modify from there.