Kirill Semenkov on Wed, 6 Feb 2002 16:07:19 +0100 (CET)(envelope-from owner-apsfilter-help@apsfilter.org)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Different dialects of PostScript?


          Good day.

I've recently found a strange problem while printing to HP Color LaserJet 4450N.
Pictures and PostScript files are printed correctly while text files and html
files aren't. a2ps was used as filter for text files printing. HTML files were
printed from within browsers (Netscape 4.77 and konqueror 2.1.1). Printer gives
a kind of error: PostScript error:  stack and so on... 
ghostscript interprets PostScript files generated with a2ps and browsers
correctly. I used apsfilter 6.1.1 and GNU GhostScript 6.51 with PostsScript
level3 support compiled. It seems to me printer and apsfilter output speak
different PostScript level 3 dialects. Setting GS_OPTIONS="-dLanguageLevel=3"
doesn't help.

I looked through interiors of the apsfilter executable and made a small magic
correction solving the problem. The patch is attached.
So my question is. Have anybody observed such an effect and is there a simpler
method to solve described problem?

Yours sincerely,

       Kirill Semenkov.

--- apsfilter.ori	Mon Feb  4 17:02:32 2002
+++ apsfilter	Mon Feb  4 17:04:32 2002
@@ -989,11 +989,13 @@
 		pnm2ppa -v ${PRINTER#ppa_} $PPA_OPTS ${MONO:+--bw} | print_data
 	    ;;
 	*)
-	    eval gs -q -dNOPAUSE -dSAFER -sDEVICE="$PRINTER" \
-		${GS_MODEL:+-sModel="$GS_MODEL"} \
-		${RESOLUTION:+-r"$RESOLUTION"} -sPAPERSIZE="$PAPERSIZE" \
-		-sOutputFile=- $GS_FEATURES ${PS_INIT:+'"$PS_INIT"'} $input \
-		${PS_EXIT:+'"$PS_EXIT"'} | print_data
+         gs -q -sPAPERSIZE="$PAPERSIZE" -sDEVICE=pswrite -sOutputFile=- -dNOPAUS
+E -dBATCH -dSAFER $input | \
+            gs -q -dNOPLATFONTS -dNOPAUSE -dBATCH -dSAFER -sDEVICE="$PRINTER" \
+                ${GS_MODEL:+-sModel="$GS_MODEL"} \
+                ${RESOLUTION:+-r"$RESOLUTION"} -sPAPERSIZE="$PAPERSIZE" \
+                -sOutputFile=- $GS_FEATURES ${PS_INIT:+'"$PS_INIT"'} $input \
+                ${PS_EXIT:+'"$PS_EXIT"'} | print_data
 	    ;;
     esac
 }