CS4 cannot record Print step in Actions

H
Posted By
Hartmonstr
Oct 23, 2008
Views
1105
Replies
27
Status
Closed
I’m trying to record a Print step in a CS4 action. With the recording on, I go to File > Print and set all the printer attributes, then click Print. A page prints. But the resulting recorded action only shows a Set Print Option step, and no Print step. When you play the action, the Set Print Option runs but nothing is sent to the printer.

This works fine in CS3. Is this a bug, or what gives?

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

TD
Tony_Defriez
Oct 23, 2008
I have the same issue and the same action print fails but if I record the action in CS3, save the action (export) and then load this action in CS4 it appears to work…… Customer support withdraw (without my input) the case – this is clearly a recording bug in CS4 – I am about to re-open the case – keep you posted
H
Hartmonstr
Oct 23, 2008
Tony, I tried importing a CS3-saved Print action but got a very weird result. The type and photos are backwards (as if they were printed upside down), and the colors are inverted in a very strange way, as well. The background color, which should be white, is bright green. The photo image prints in two colors, with red for all highlights and yellow for all shadow areas.

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.
TD
Tony_Defriez
Oct 23, 2008
Yes I started to get the same now – seems its broken – nothing back on case yet….
P
PictureDude
Jan 10, 2009
I am having the exact same problem. I just upgraded from CS3 and moved my actions to CS4. That print action makes my images print in reverse, so my prints look like a negative.

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
JG
Jay_Grover
Jan 19, 2009
I am with you guys, this is a very crippling problem for my studio and workflow. Any help solving this would be awsome. Has anybody contacted Adobe Tech?
R
Ram
Jan 19, 2009
upgraded from CS3 and moved my actions to CS4

The obvious question: have you tried recording the action from scratch in CS4?
P
PictureDude
Jan 19, 2009
Yes, I tried recording from Scratch. It will not record in CS4 period. So if you take the CS3 action and play it back in CS4, you get a reversed image that looks like a negative.
P
PictureDude
Jan 19, 2009
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!
JG
Jay_Grover
Jan 19, 2009
I hav also re-built the action from scratch to no avail.

This sucks, and seems to me this function should be elementry. Still looking for a fix.
PR
Paul_R
Jan 19, 2009
PictureDude:-
I haven’t got a printer attached to my laptop and that has CS4 on, but you could try this script and see if it works?

#target photoshop
app.activeDocument.printOneCopy();
PR
Paul_R
Jan 19, 2009
Well I have set up a network printer and tested the code above and it prints with no problem. Hope it works for you.
P
PictureDude
Jan 19, 2009
Paul,

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…
PR
Paul_R
Jan 19, 2009
With mine I have to set up the printer with the preset I want to use and then call the print script.
I don’t think there is a way to select a preset.
Using
app.activeDocument.print();
has the follow documention…..
Document.print (postScriptEncoding: PrintEncoding , sourceSpace: SourceSpaceType , printSpace: string , intent: Intent , blackPointCompensation: Boolean )
Adobe Photoshop CS4 Object Library
Prints the document.
postScriptEncoding (optional): Data Type: PrintEncoding , Default Value: PrintEncoding.BINARY The encoding type.
sourceSpace (optional): Data Type: SourceSpaceType , Default Value: SourceSpaceType.DOCUMENT The color space for the source.
printSpace (optional): Data Type: string
The color space for the printer. Can be "nothing" (meaning same as source); one of the working spaces or Lab color; or a string specifying a color space. Default: nothing.
intent (optional): Data Type: Intent , Default Value: Intent.RELATIVECOLORIMETRIC The color conversion intent.
blackPointCompensation (optional): Data Type: Boolean , Default Value: true If true, black point compensation is used.
P
PictureDude
Jan 19, 2009
Paul,

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
PR
Paul_R
Jan 19, 2009
That’s the thing you can’t.
That was just the documentation for the print command, and the options you require are just not there.
The only parameters are:
postScriptEncoding
sourceSpace
printSpace
blackPointCompensation
There is no way of selecting the printer features.

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.
P
PictureDude
Jan 19, 2009
Can you setup a Applescript to print using the printer setups and then run that script in Photoshop?
JG
Jay_Grover
Jan 20, 2009
Thank you for the fixes, I have not had a chance to try them out yet.

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 ;-{
PR
Paul_R
Jan 20, 2009
I have a couple of Macs but never used AppleScript, a quick search on Google produced this. <http://fundisom.com/apple/search/applescript-printing/>
P
PictureDude
Jan 21, 2009
This information was given to me from Adobe Tech Support on this printing issue… I’ve not been able to figure out how to get my printer settings yet, but perhaps someone will help figure it out…

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.AbsoluteColorimetr ic;

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.USERDE FINED, 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=200703121006202 42>

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:

<http://www.apple.com/applescript/>
JG
Jay_Grover
Jan 22, 2009
Will all this chinese work on XP? Do you think adobe will work out this problem ever? Are we the only ones having this trouble?
PR
Paul_R
Jan 22, 2009
The code will work on XP as javaScript is cross platform. AppleScript is Mac only. What it comes down to is set up your printer to the preset/tray setting that you want as default then run

#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?
P
PictureDude
Jan 22, 2009
Paul,

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
P
PictureDude
Jan 22, 2009
I’m probably not understanding this but I tried to play this script…

#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?
PR
Paul_R
Jan 22, 2009
This is where you need someone that uses AppleScript, I know less that nothing, I do know that you can call javaScript within AppleScript.

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.
CP
christoph_pfaffenbichler
Jan 31, 2009
Paul, do You have any idea if one can change the targeted printer in CS4 with docRef.printSettings.activePrinter?
PR
Paul_R
Jan 31, 2009
I have tried but not managed to do it Christoph.
CP
christoph_pfaffenbichler
Jan 31, 2009
Thanks, Paul.
I had just thought the property being Read-write one could use it to change the printer.

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections