Offending command: stack

While a RIP processes a PostScript file, it needs to keep track of many things and it does this by ‘stacking’ all of these temporary values on top of each other, a bit like the pile of paperwork you might have on your desk. When an error occurs, it is useful to know what is on that stack since it might give a programmer or support engineer an indication of what the interpreter was working on. That is why a PostScript error also contains a dump of the stack, as shown below:

ERROR: undefinedresult


STACK: 2380.1 3366.1

In the above case the stack contains two numbers but it could just as well be PostScript commands.

A PostScript error with offending command stack does not really exist. For some reason the offending command is simply not listed. Troubleshooting an error without knowing which command caused it, can be difficult. The error may be caused by a communication issue.

There are fortunately specific cases for which a fix is available:

Issues with the HP 4550 and blank pages

Every time a Windows machine prints to our HP 4550dn, it also prints two additional pages, one is blank, the second has the following PS error:

“ERROR: undefined

It never lists the offending command or stack.

This happens when you print binary jobs. The same issue is discussed in this thread.

Either change the printer driver postscript settings to ASCII or, if you want binary for smaller print jobs when printing over the TCP/IP network to the Jetdirect’s LPR BINPS queue, do then the following:
When you print into a file (hint: change Port to File: ), you will see at the end of the print job something like

%-12345X@PJL EOJ
The cause is HP’s adding to the PPD an for BINPS LPR an unnecessary TBCP switch.
Here’s the fragment in the PPD:
*% =================================
*% Emulations and Protocols
*% =================================
*Protocols: PJL TBCP
*JCLBegin: “”
*JCLEnd: “<1B>%-12345X@PJL EOJ <0A><1B>%-12345X”

I changed the line above into

*JCLEnd: “”

and now I can create and print binary postscript in Windows 7 x64.
Just change the ppd file and delete the bpd one. You might have to reinstall the driver. Verify the output by printing into a file.
The print processor is not relevant. It works with WinPrint or hpcpp118 from the HP Universal Print Driver.
Regarding PPD’s: I tried the in “Windows 7 Prof x64” included HPMCD25.PPD, from the HP lj558.exe “Windows XP” driver the HPB45507.PPD and the “HP Universal Printing PS” hpcu118s.ppd file.
All have the above section and the remedy works for those drivers. They actually all use the same MS Postscript5 driver.

If you want the have a lean system, or your printer has no current Windows PS driver, but you have a printer device specific PPD, just create your own driver. It’s a tip from the German computer magazine c’t 2010/21, page 154. Here’s how:
Copy into a new folder the Windows system files P5UI.DLL, PSCRIPT.HLP, PSCRIPT.NTF, PSCRIPT5.DLL, the printer’s PPD and this handmade template printer.inf :

Signature=”$Windows NT$”
“Printer Name” = printer.ppd
[email protected],PSCRIPT

Then, when installing a new printer, choose this folder.

2 thoughts on “Offending command: stack

  1. I often get “STACK” error (and nothing else prints) when trying to print an HTML web page. Usually, the error goes away if I remove certain HTML tags — such as or

    Very annoying.
    (I'll make sure my next printer is NOT from Xerox!)

  2. Stack:
    [-null- -null-]
    [-null- -null-]

    %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    %%[ Warning: PostScript error. No PDF file produced. ] %%
    Distill Time: 00 Hour(s) : 02 Minute(s) : 52.225 Second(s)

Leave a Reply

Your email address will not be published. Required fields are marked *