Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!ngb From: ngb@otter.hpl.hp.com (Neal Baker) Newsgroups: comp.sys.hp Subject: Re: HPGL on the HPLaserjetIII Message-ID: <2980012@otter.hpl.hp.com> Date: 12 Dec 90 13:34:30 GMT References: <15737.27637b0d@ccvax.ucd.ie> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 105 I can only suggest inspecting the codes in the HPGL file. I personally know very little about PCL but recently I have been translating it into a readable form. The meaning of the codes can be found in an HP publication "Technical Reference Manual" for the Laserjet printer family, HP part # 02686-90912, produced by Hewlett Packard Company Boise Division po Box 15 11311 Chinden Blvd Boise Idaho 83707 Also the Personal Products Assist line tel.208-323-2551 may help. I include below a shell script and a sed command file for translating PCL into a semi-readable form. Neal Baker Hewlett Packard Laboratories Bristol England --------------------------------------------------------------------- # # Translate a file of PCL codes into a sort of printable form on # standard output. sed -n -e 'l' $1 > temp sed -n -f pcl.sed temp --------------------------------------------------------------------- pcl.sed: # # Sed script to convert PCL stream to English. # :start /\n/ b flush # Join folded lines - remove '\' at eol. N s/\\\n//g # Control: s/\\33E/--RESET--/g s/\\33&l.H/--PAGE FEED--/g s/\\33&f0X/--START MACRO--/g s/\\33&f1X/--STOP MACRO--/g # Page format: s/\\33l0O/\ --PORTRAIT--/g s/\\33l1O/\ --LANDSCAPE--/g s/\\33&l\([+-]*[0-9]*\)P/--PAGE LENGTH \1--/g s/\\33&l\([+-]*[0-9]*\)E/--TOP MARGIN \1--/g s/\\33&l\([+-]*[0-9]*\)F/--TEXT LENGTH \1--/g s/\\33&a\([+-]*[0-9]*\)L/--LEFT MARGIN \1--/g s/\\33&a\([+-]*[0-9]*\)M/--RIGHT MARGIN \1--/g s/\\339/--CLEAR MARGINS--/g s/\\33&l\([+-]*[0-9]*\)D/--\1 LINES\/INCH--/g s/\\33&s0C/--WRAP ON--/g s/\\33&s1C/--WRAP OFF--/g # Cursor movement: s/\\33\*p\([+-]*[0-9]*\)Y\\33\*p\([+-]*[0-9]*\)X/\ --Y \1 DOTS, X \2 DOTS--/g s/\\33\*p\([+-]*[0-9]*\)Y/\ --Y \1 DOTS--/g s/\\33\*p\([+-]*[0-9]*\)X/--X \1 DOTS--/g s/\\33\&a\([+-]*[0-9\.]*\)V\\33\&a\([+-]*[0-9\.]*\)H/\ --Y \1 POINTS, X \2 POINTS--/g s/\\33\&a\([+-]*[0-9\.]*\)V/\ --Y \1 POINTS--/g s/\\33\&a\([+-]*[0-9\.]*\)H/{\1}/g # Raster: s/\\33\*r0A/\ --START RASTER AT LEFT--/g s/\\33\*r1A/\ --START RASTER AT CURSOR--/g s/\\33\*b\([+-]*[0-9]*\)W/\ --RASTER LINE \1--/g s/\\33\*rB/--END RASTER--/g s/\\33\*c[0-9]P/\ --FILL REGION--/g # Font selection: s/\\33([0-9]*[A-Z]/--FONT--/g # Translate octal codes that screw up the display: s/\\[0-7][0-7][0-7]/\|/g # Flush converted lines - up to '\n'. :flush /\n/ { P D } b start ---------------------------------------------------------------------