• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended
Deskjet 2000 j210a
Other

I want to send print commands to printer which can print a sample message provided by me.

 

I am looking for basic PCL3 command set for printing.

I tried Escz command also but it's not working.

 

 

Please provide me some example commands set .

17 REPLIES 17
HP Recommended

Hello, @P_1 – Greetings!
 

Welcome to the HP Forum! This is a wonderful location to converse with the community, get assistance and find tips.

 

Going through your post, I am not very clear on what operating system you working on. You have mentioned "Other" in OS field. Are you using Linux / Unix or some other OS?

 

If you are using Linux / Unix, these links might be of your assistance:

Link 1: http://hp.care/2fL7kAv

Link 2: http://hp.care/2fL7l7f

 

If you are using Ubuntu, try the steps here: http://hp.care/2h06iRa 

 

Please let me know if this resolves the issue, or if you require further assistance.

Cheers 🙂


Please click "Accepted Solution" on the post that solves your issue to help others find the solution. To show appreciation for my help, please click the "Thumbs Up Icon" below!

Please click "Accepted as Solution" on the post that solves your issue to help others find the solution. To show appreciation for my help, please click the "Thumbs Up Icon" below!

DVortex
I am not an HP Employee
HP Recommended

Hi,

 

Greetings.

 

I am working on a medical embedded device. I have interfaced a printer and able to read DeviceID and port status.

But i am not able to send commands to printer.  Normal c- language i am using.  I tried to send few commnds but unable to print. 

I tried following commands:

"LB""Any Message""\003;"

 

#define ESCAPE                              "\033"

#define COMMAND_JOB_START ESCAPE "%-12345X" ESCAPE "E" ESCAPE "&l0E" ESCAPE "&l0F" ESCAPE "&a0L" ESCAPE "&a0M" 
#define COMMAND_JOB_STOP ESCAPE "E" ESCAPE "%-12345X"

 

Please tell me the right way to use these commands.

I want to print any sample message.

 

best regards

HP Recommended

 

I think you are over engineering things right now.

 

Consider...

                                           printf("%dEmy mesage%dE",27,27);

 

The output of the printf should print "my message" on a PCL3 printer when sent to the printer port. Once you get that to work, we can point you to suitable formatting and font commands. This will likely print in Courier 10 pitch.

 

 

HP Recommended

 

 

 

Hi ,

 

I tried using simple commands like :

 

"LB""Any Message""\003;"

 

or 

Escz ("\033""z")

 

I have also tried:

char buffer[50] = "Print sample message\n";

 

buffer value sent to bulkout buffer.

 

If I am doing something wrong, please guide me.

 

Thanks & Regards.

HP Recommended

The DeskJet 200 (J210) series printers use the PCL3GUI Page Description Language.

 

As far as I can make out, this language is raster-based, using proprietary raster-compression algorithms.

 

So I doubt that it will understand plain ASCII text (but I could be wrong - I don't have access to such a printer to conduct any tests).

 

Attached is a .zip file containing a 'capture' of the 'testprint' job generated by the (Windows 10 Pro 64-bit) 'class' driver associated with this printer model; also within the zip file is an analysis of that print job.

 

Points of interest from the analysis:

 

  • The job starts with 18000 <NUL> (0x00) bytes; I think that these are used to cause the printer to flush its buffers of any remaining data before the job starts.
  • The job proper then starts with a Universal Exit Language escape sequence (which causes the printer to enter PJL mode).
  • Ths is followed by a number of PJL commands, the last of which is a PJL ENTER LANGUAGE = PCL3GUI command (which should cause the printer to initialise the PCL3 GUI interpreter).
  • This ENTER LANGUAGE command is then followed by further PJL commands - but these will be treated as data and 'printed' (or not), since the device is no longer in PJL mode (so looks like a driver bug!).
  • There are then a few PCL initialisation escape sequences (to set paper size, orientation, plex mode, etc., as well as some related to device-specific (proprietary) 'driver' and 'raster' configuration data).
  • The remainder of the job appears to be a series of (compressed?) raster-data images.
HP Recommended

In the past, there have been PCL3gui printers that also supported PCL3, but if this printer only supports the gui version then it will be time for a different printer. Good catch.

HP Recommended

>> ...  there have been PCL3gui printers that also supported PCL3, but if this printer only supports the gui version ...

 

Jim - your guess is as good as mine regarding the capabilities of this printer. 

HP Recommended

After a bit of searching I found a document that confirms the Deskjet 2000 is indeed a PCL3gui ONLY printer. So @P_1 you should find another printer for this application. I would look for a PCL5 LaserJet, but a DeskJet that supports real PCL3 will be adequate. Good luck!

HP Recommended

 

 

Hi Everyone,

 

Greetings.

 

Thanks to all for your support.

 

Definitely I would go for PCL5 Laserjet printer. Even  I have tried Laserjet printer as well. Strange thing I observed that Laserjet printer was detected as a Mass Storage Class device, I have also confirmed with USBlyzer tool.

 

 

My question is still: Can I get a sample message print by any commands using Deskjet 2000 ?

Likewise I have mentioned above, just to make sure that my approach is right in sending data to BulkOut endpoints.

Or any command I could send to printer and get any responses.(Reset or self-test) . I tried different commands but didn't get responses from printer. 😉

 

I would go for PCL5 anyways.

 

Best Regards.

Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.