This HP Community is for Customer to Customer Product Support. First Time Here? Check Out Videos on How to Search, Register, Post and More.

Direct transmission of HPGL to USB printer (2007 Views)
Reply
Honor Student
KenB
Posts: 3
Registered: ‎01-15-2009
Message 1 of 2 (2,007 Views)
Accepted Solution

Direct transmission of HPGL to USB printer

I have written a couple of programs using Delphi that send HPGL commands directly to the printer.  That was easy when printers typically connected to the parallel port and languages typically provided a "LPT1" output device identifier.  To write HPGL directely to a USB device apparently requires calls to the Win32 API.  I don't have the documentation required.  Do you have a "template" for by-passing the Windows spooler to write directly to a printer on a USB port?
Please use plain text.
Honor Student
KenB
Posts: 3
Registered: ‎01-15-2009
Message 2 of 2 (1,985 Views)

Re: Direct transmission of HPGL to USB printer

I managed to solve this problem myself over the weekend.  I can now send PCL5 and HPGL escape code directly to any printer regardless of whether it is connected via USB or parallel port.  My code is written in Codegear (Borland) Delphi.  If you would like a copy of the code, email me at kbeaudrie@totalspeed.net.  If you are not using Delphi, you will have to translate the code snippets into what ever language you are using.  The code involves making calls to the Win32 API.
Please use plain text.