Shiva described a Zebra printer issue to me. They had configured Zebra007 printer on Dev and Test, and it printed fine. However when the same printer was configured on Production instance, it did not print anything. I worked with Puneet and Sateesh to check the windows printer queue. Whenever a print job was executed in Dev or Test (non-Production) instances, the label printed correctly. However when they tried to print from Production, it would not print anything, though a pasta*.tmp appeared in windows printer queue for 2 seconds.
I also got a sample file example.zpl from Sateesh to find out the contents, This file was a plain text file which contained print control characters. This is an ingenious way to print without installing expensive proprietary drivers from vendors. If such a file is sent as a raw file to printer, the printer interprets the special characters and prints labels correctly. So they were using Pasta printing to print a text file. This didn't make sense, as pasta is typically used to convert (preprocess) pdf files generated by XML Publisher (now known as BI Publisher) into postscript format and send to printer.
I examined the $FND_TOP/resource/pasta.cfg in Production and non-Production instances. They were different. Non-production pasta files had everything commented, whereas Production pasta file had this entry:
$ cd $FND_TOP/resource
$ cat pasta.cfg
/* $Header: pasta.cfg 115.23 2003/03/28 22:57:31 mnagakur noship $ */
[DEFAULT]
preprocess=/usr/local/bin/pdf2ps {infile} {outfile}
printCommand=lp -c -d{printername}
errorlogfile=pasta_pdf2.log
I realized then that, the printing was successful in development, as pasta was not doing any kind of preprocessing and printing the file. It failed in Production because the text file containing printer commands was going through preprocessing:
/usr/local/bin/pdf2ps example.zpl pasta8282.ps
Error: /undefined in .CT~~CD,~CC^~CT~
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1129/1686(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)--
Current allocation mode is local
Current file position is 17
GPL Ghostscript 8.54: Unrecoverable error, exit code 1
The solution was to create a new pasta driver pasta_zebra.cfg where the preprocess line would be commented:
$ cat pasta_zebra.cfg
/* $Header: pasta.cfg 115.23 2003/03/28 22:57:31 mnagakur noship $ */
[DEFAULT]
; preprocess=/usr/local/bin/pdf2ps {infile} {outfile}
printCommand=lp -c -d{printername}
errorlogfile=pasta_pdf.log
I tested this on commandline with this command:
FNDPSTAX -pnZebra007 -f/tmp/example.zpl -c1 -Fpasta_zebra.cfg
And it printed the first correct label from Production instance.
This command would be the final result of the printing inside E-Business Suite.