PCL print program PCL print program Buff1 (Programmer) (OP) 18 Sep 04 05:13 I would like to develop a PCL print program.I am experienced in PCL but not real great with API printing. I'd like to do it in PowerBasic for windows.If anyone is interested, I think it could be lucrative. RE: PCL print program DansDadUK (Programmer) 19 Sep 04 08:49 Just what do you mean by a PCL print program:A PCL viewer (like SwiftView)?A PCL analyser (there are several available; I've written one (in C++) for internal use in my company)?A PCL generator (to do things like box drawing, etc.)?Or what? RE: PCL print program Buff1 (Programmer) (OP) 19 Sep 04 13:38 Primaraly to print pcl on any printer. A preview would benice but not mandatory.I have created dialogs then printed the window which worksfine but I usually need to print more for the entire pageand have not been able to print an entire window if the window is larger (height) than the screen.I can also send pcl to a printer and let the printer interpret the pcl. This works fine for LaserJets and mostinkjets that support PCL but won't print to, for example,dot matrix printers.I also have a DLL (DLLPRINT) that will print to any printerusing ESC/P2 syntax (with a few differences - some esc sequences not supported and a few additional that are just for dllprint). It's good but I have to use reverse line feeds to move up the page rather than a simple Esc&a#r#H sequence (or Esc&a#v#H)I also have LaserTwin that I use for a reference but it's aMS-DOS program. Never saw (though I've seen reference to) the windows version (it may have only worked on W3.1). RE: PCL print program cantubas (Programmer) 21 Sep 04 07:57 what do you do with your PCL analyser, DansDadUK ???? RE: PCL print program UncleRick (Vendor) 21 Sep 04 11:40 @DansDadUK I second that question. What is the licence? Is it available to others who use PCL? Its name certainly sounds interesting. Is it like PCLCodes in PCLTools?Interested, RE: PCL print program DansDadUK (Programmer) 21 Sep 04 14:48 My PCL Analyser tool (Windows-only (created using Borland C++ Builder)) parses and provides an interpretation of the PCL, PJL, HP-GL2 and PCLXL sequences in a specified file, so it is a bit like PCLCodes.At present, it is an internal-use only tool, although I suppose that if there was sufficient interest, my company might provide a licensed external version.Sample output (in text form, I can't show screen shots here) for PCL5:CODEOffset(dec) Type Sequence Data / Interpretation¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0000000000 Special <Esc>%-12345X Universal Exit Language (UEL) Comment Switch language to PJL0000000009 PJL Command @PJL SET PAGEPROTECT=OFF[0a]0000000034 PJL Command @PJL SET USERNAME="1"[0a]0000000056 PJL Command @PJL SET HOLD=OFF[0a]0000000074 PJL Command @PJL SET QTY=1[0a]0000000089 PJL Command @PJL SET RESOLUTION=600[0a]0000000113 PJL Command @PJL ENTER LANGUAGE=PCL[0a] Comment Switch language to PCL0000000137 Data [0d]0000000138 PCL Simple <Esc>E Printer Reset0000000140 PCL Complex <Esc>*t600R Raster Graphics Resolution (dpi)0000000147 PCL Complex <Esc>&u600D Unit-of-Measure (PCL units per inch)0000000154 PCL Complex <Esc>*r0F Raster Graphics Presentation: Logical0000000159 PCL Complex <Esc>&l0o Orientation: Portrait0000000164 1E Top Margin (lines)0000000166 PCL Complex <Esc>&l0S Simplex/Duplex: Simplex0000000171 PCL Complex <Esc>&l2H Paper Source: Value is Printer Dependent0000000176 PCL Complex <Esc>&l2a Page Size: Letter0000000181 8c Vertical Motion Index (1/48 inches)0000000183 1E Top Margin (lines)0000000185 PCL Complex <Esc>*p0x Cursor Position (PCL units): Horizontal0000000190 0Y Cursor Position (PCL units): Vertical0000000192 PCL Complex <Esc>*c0t Set Picture Frame Anchor Point0000000197 5760x Picture Frame Size (decipoints): Width0000000202 7704Y Picture Frame Size (decipoints): Height0000000207 PCL Complex <Esc>&l1X Number of Copies0000000212 PCL Complex <Esc>*b0M Set Compression Mode: Unencoded0000000217 Data [0d]0000000218 PCL Complex <Esc>*c16534D Assign Font ID Number0000000227 PCL Complex <Esc>)s8984W Download Font Header0000000235 PCL Binary [ 72 bytes ] Font header descriptor: Descriptor Size: 72 Header Format: 15: Truetype Scalable Font Type: 2: Bound; PC-8 (0x01-06, 0x10-1a, 0x1c-ff printable) First Code:  Last Code: [00ff] Symbol Set: Kind1 value: 17 ----> Identifier: 0Q Spacing: 1: Proportional Scaling: Technology: 1: TrueType Variety: 0 Scale Factor: 8 design units per Em Master Design: Space Width: 640 design units Style: Value: 992 Structure: >=576: Unknown (Reserved) Width: 0: Normal Posture: 0: Upright Stroke Weight: 0: Medium (Book or Text) Typeface: Family Code: 254 Font Name: Tahoma Orientation: 0: Portrait Serif Style: 0: Sans Serif Square Width Type: 0: Normal Quality: 2: Letter Quality Placement: 0: Normal Cell Width: 3969 design units Text Width: 910 design units Cell Height: 2543 design units Text Height: 2107 design units Cap Height: 1489 design units Underline: Thickness: 102 design units Position: 409 design units below baseline0000000307 PCL Binary [ 8910 bytes ] Font header segmented data:0000000307 Segment type: PA: Panose Description0000000309 Segment length: 100000000311 Segment data [ 10 bytes ] 0000000321 Segment type: GT: Global TrueType Data0000000323 Segment length: 88880000000325 Segment data [ 1723 bytes ] 0000002048 Segment data [ 2048 bytes ] 0000004096 Segment data [ 2048 bytes ] 0000006144 Segment data [ 2048 bytes ] 0000008192 Segment data [ 1021 bytes ] 0000009213 Segment type: 0xffff: Null segment0000009215 Segment length: 00000009217 Reserved byte  0000009218 Checksum [c1] 0000009219 PCL Complex <Esc>(s9.5V Primary Height (points)0000009226 PCL Complex <Esc>(16534X Select Primary Font by ID0000009234 PCL Complex <Esc>&d@ Underline Disable0000009238 PCL Complex <Esc>*c32E Character Code0000009244 PCL Complex <Esc>(s170W Download Character0000009251 PCL Binary [ 170 bytes ] 0000009421 PCL Complex <Esc>*c33E Character Code0000009427 PCL Complex <Esc>(s112W Download Character0000009434 PCL Binary [ 112 bytes ] 0000009546 PCL Complex <Esc>*c34E Character Codeand for PCLXL:CODEOffset(dec) Type Sequence Data / Interpretation¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0000000000 Special <Esc>%-12345X Universal Exit Language (UEL) Comment Switch language to PJL0000000009 PJL Command @PJL ENTER LANGUAGE = PCLXL[0d][0a] Comment Switch language to PCLXL (PCL6)0000000038 PCLXL Stream Header 0x292048.. ") HP-PCL XL;2;0;Gandlake LaserServe PCL XL drive"0000000086 0x720a "r[0a]"0000000088 PCLXL Data Type 0xc0 ubyte0000000089 Value 0x00 eInch0000000090 PCLXL Attribute 0xf886 Measure0000000092 PCLXL Data Type 0xd1 uint16_xy0000000093 Value 0xe803e803 1000 10000000000097 PCLXL Attribute 0xf889 UnitsPerMeasure0000000099 PCLXL Data Type 0xc0 ubyte0000000100 Value 0x02 eErrorPage0000000101 PCLXL Attribute 0xf88f ErrorReport0000000103 PCLXL Operator 0x41 BeginSession No. 10000000104 PCLXL Data Type 0xc0 ubyte0000000105 Value 0x00 eDefaultDataSource0000000106 PCLXL Attribute 0xf888 SourceType0000000108 PCLXL Data Type 0xc0 ubyte0000000109 Value 0x01 eBinaryLowByteFirst0000000110 PCLXL Attribute 0xf882 DataOrg0000000112 PCLXL Operator 0x48 OpenDataSource No. 20000000113 PCLXL Data Type 0xc8c10900 ubyte_array0000000117 Value 0x474c4c.. "GLLSForm1"0000000126 PCLXL Attribute 0xf88b StreamName0000000128 PCLXL Operator 0x5b BeginStream No. 30000000129 PCLXL Data Type 0xc2 uint320000000130 Value 0xab000000 1710000000134 PCLXL Attribute 0xf88c StreamDataLength0000000136 PCLXL Operator 0x5c ReadStream No. 40000000137 PCLXL Data Type 0xfb embedded_data_byte0000000138 PCLXL Embedded Len. 0xab 1710000000139 Data [ 171 bytes ] 0000000310 PCLXL Operator 0x5d EndStream No. 5 RE: PCL print program UncleRick (Vendor) 22 Sep 04 10:52 Well if you choose a FOSS licence I would love to try it. I'm a service technician for Canon Canada Inc. One of my main functions is troubleshooting PCL from mainframes and UNIX boxes. This tool looks very handy for that. kudos to you for writing it. I'm curious, how does it handle a bad escape sequence? Like <Esc>&f15X or <Esc>(s7P or <Esc>s1P. Sorry I got a little excited there.Cheers, RE: PCL print program Sweaver99 (Programmer) 22 Sep 04 14:36 I use Pitneys Print Stream Analyst it does the same thing but both are missing 1 thing....a hex editor window to manipulate the pcl. I may just write one myself that does this.... RE: PCL print program DansDadUK (Programmer) 22 Sep 04 15:09 Uncle Rick; your invalid sequences would be reported as:CODEOffset(dec) Type Sequence Data / Interpretation¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0000000000 PCL Complex <Esc>&f15X Macro Control (?value)0000000006 PCL Complex <Esc>(s7P Primary Spacing (?value) *** Warning *** Unexpected sequence found:0000000011 Data [1b]s1Pand the application indicates (via a popup) that an invalid sequence was detected (for the last one only, as the first two are valid sequences with unknown values).By the way, what does FOSS stand for? I assume it's something to do with Open Source? RE: PCL print program DansDadUK (Programmer) 22 Sep 04 15:15 Sweaver99I thought of adding hex-editing to my analyser, but decided that there are better tools for this already available.I use my analyser to interpret the contents, then use HexWorkshop (www.bpsoft.com) to make any required changes (finding the correct position is easy as the analyser shows the file offsets); I then repeat the analysis to confirm the changes are correct (especially when editing PCLXL). RE: PCL print program UncleRick (Vendor) 23 Sep 04 10:13 FOSS is Free and Open Source Software.http://en.wikipedia.org/wiki/Free/Libre_Open_Sourc...please contact me if your company plans on releasing firstname.lastname@example.org, RE: PCL print program Buff1 (Programmer) (OP) 25 Sep 04 17:23 What I would like to work on, is a dll that I canuse to print pcl reports to any printer whetherit be dot matrix or BJ or HP LJ/IJ compatible.I can print PCL to an HP compatible Laser / Ink jetnow, but there are still users of epson compatibleESC/P and others that I would like the program towork with too.Of course the printer would have to have graphics capability, that's a given, and a driver that wouldwork.One idea, would be to convert the report to a BMP,then print the BMP using api calls.Another idea is to convert the report to a windowswindow, and print the window to the printer.I can print the window to the printer and have hadsuccess to an extent making the report look rightbut the problem is getting the entire page so itshows on the screen because I can only, at present,print what's visible in the window, even though I may have a larger window (scrollable). RE: PCL print program DansDadUK (Programmer) 29 Sep 04 16:04 Buff1I think that what you are trying to achieve is already provided by SwiftView (via the DirectPrint, FastPrint and WindowsPrint options). RE: PCL print program Buff1 (Programmer) (OP) 30 Sep 04 22:39 I am aware of other third-party software. I am not happywith any I have seen. Some are ok but not what i'd like.Besides, I would like to develop one for sale as well asuse in my own circumstance. I haven't seen any that willprint pcl to a dot matrix printer (i.e. do a conversion).