This works fine in CS3. Is this a bug, or what gives?
I've been able to repeat this error every time I try it, and on two different computers. I wish it could only be this easy to fix.
Have you found a fix to record "print" on CS4?
I made sure I have the no updates on my CS4, it say's I have the latest version..
Any help would be appreciated.
Gary
upgraded from CS3 and moved my actions to CS4
The obvious question: have you tried recording the action from scratch in CS4?
Has anybody contacted Adobe Tech?
Yes, and Adobe's Tech support says ...
"After conferring with our product engineers, we have determined that
there is, unfortunately, no known workaround for this issue."
I guess the obvious work around it to go back to CS3, which is what I've done on one work station, so we can at least print for now. We print hundreds of pages a day, using the automated catalog and print action, so this is crippling my workflow.
Anyone have a way to do "Print" using scripts, instead of an action? I've asked Adobe to help using scripts and they said "
Unfortunately, we do not have any such script available at this time".
Does anyone know a script to print, the I could just play the script in an action?
Thanks for responding to this topic. Hopefully we'll get a fix!
This sucks, and seems to me this function should be elementry. Still looking for a fix.
#target photoshop
app.activeDocument.printOneCopy();
Thanks, that did work.
But, it doesn't print to the settings I have saved for my printer. It simply prints with basic printing, so the colors and contrast aren't very good...
I have presets made, is there a way to print using a "preset"?
My preset is named "Lower Enhanced Letter Size".
Thanks for this work around...
It looks to me that your script is the first part of the "print" box.
I tried to copy your script and it error'd out. So was that script ready to use ?
The second print box is what I'm referring to and chooses the ...
Layout
Color Matching
Paper Handling
Paper Feed
Cover Page
Scheduler
Image Quality
Job Types
Printer Features
So how would you choose on my printer (for example) which tray I wanted to print from and what color conversion to use? which are all the things that are already setup in my "Presets".
An "Paper Handling" and "Image Quality" are the two things I need to be able to play back in our script...
Thanks for your help...
Gary
The only other way that I can think of that might work is to use another program that will log the keystokes and can utilize them in Photoshop, I believe there are a few about depending on the OS.
It is a shame we should not have to jump through these hoops for this simple command.
I don't know about you guys but I grabbing my pitch fork and torch and heading to the adobe castle to kill the monster, we need to become an angry mob ;-{
You can customize the Photoshop print settings, such as Color
Management, by defining the printSettings paramaters for your document
before using printOneCopy() or print(). Here is a basic list of your
options:
-------------------------------------
var docRef = app.activeDocument;
docRef.printSettings.caption = true/false;
docRef.printSettings.labels = true/false;
docRef.printSettings.cornerCropMarks = true/false;
docRef.printSettings.centerCropMarks = true/false;
docRef.printSettings.colorBars = true/false;
docRef.printSettings.regMarks = true/false;
docRef.printSettings.negative = true/false;
docRef.printSettings.flip = true/false;
docRef.printSettings.interpolate = true/false;
docRef.printSettings.vectorData = true/false;
docRef.printSettings.hardProof = true/false;
docRef.printSettings.mapBlack = true/false;
docRef.printSettings.printSelected = true/false;
var bgColor = new SolidColor;
bgColor .rgb.red = xxx;
bgColor .rgb.green = xxx;
bgColor .rgb.blue = xxx;
docRef.printSettings.backgroundColor = bgColor;
docRef.printSettings.renderIntent = Intent.PERCEPTUAL/intent.SATURATION/
intent.RelativeColorimetric/intent.intent.AbsoluteColorimetric;
docRef.printSettings.printBorder = xx;
docRef.printSettings.bleedWidth = xx;
// Format for setPagePosition(DocPositionStyle, X (optional), Y
(optional), scale (optional))
// DocPositionStyle.USERDEFINED
// DocPositionStyle.PRINTCENTERED
// DocPositionStyle.SIZETOFIT
docRef.printSettings.setPagePosition(DocPositionStyle.USERDEFINED, 1.5,
2.0);
-------------------------------------
If necessary, you can also get the list of printers and the current
printer using code similar to the following:
------------------------------------
var currPrinter = docRef.printSettings.currentPrinter;
var message = "Printer is: " + currPrinter;
alert(message);
printers = docRef.printSettings.printers;
message = "Printers are: " + printers;
alert(message);
-------------------------------------
For more information about the above options, search for the print
function and printSettings in the Photoshop CS4 JavaScript reference
PDF.
You cannot, unfortunately, change settings at the operating system level
using JavaScript. This means that you are unable to set your printer
preset.
To control the settings that are used in the printer's dialog, set these
in the system by doing a print with the settings before running the
Photoshop automation. You should be able to do this in Photoshop or in
another application on your system; whichever is more convenient for
your workflow. (Print settings that you select in Mac OS typically
carry over to each new printing session, regardless of the application.)
Alternatively, you can use AppleScript to set the printing preset to
use, and then run the JavaScript. With a quick search of the internet,
I located the following web pages that discuss methods for setting a
printer preset using AppleScript:
<http://forums.macosxhints.com/archive/index.php/t-74787.html>
<http://www.macosxhints.com/article.php?story=20070312100620242>
You can use AppleScript to call a .jsx file as well by adding a command
similar to the following the the end of the AppleScript file:
-------------------------------------
do javascript printInCS4.jsx
-------------------------------------
For more information about using AppleScript with Photoshop, see the
AppleScript Ref PDF that should be located in the /Applications/Adobe
Photoshop CS4/Scripting/Documents/ folder. For more information about
AppleScript, please access the following URL:
#target photoshop
app.activeDocument.printOneCopy();
On a mac it looks like you should be able to change the preset by using AppleScript
do shell script
"defaults write com.apple.print.custompresets
com.apple.print.lastPresetPref PresetName"
Maybe a Mac user that uses AppleScript can confirm this?
Thanks for your post!
What it comes down to is set up your printer to the preset/tray >setting
that you want as default then run
That would be a wonderful solution, but you cannot set up any of those settings to "default".
The only things that you can set is the "Default Printer" no settings and "Default Paper Size in Page Setup". This is the problem...
I use color settings to make my colors match my prints, as well as contrast, Print Quality, etc..
Since Photoshop CS4 cannot use "Actions" to record this, how can I get a script to work, so it will print, using those settings or the simple way would be to print using the "preset name"?
Gary
#target photoshop
app.activeDocument.printOneCopy();
//On a mac it looks like you should be able to change the preset by using AppleScript
do shell script
"defaults write com.apple.print.custompresets
com.apple.print.lastPresetPref Lower Enhanced Letter Size"
I got this error....
Error 25 : expected: while
Line: 6
Do Shell script
Now my preset it named "Lower Enhanced Letter Size"
Did I misunderstand about this?
Putting the javaScript code and AppleScript code as is into a script will not work.
Need someone that uses AppleScript to say what/how to combine the code.