cancel
Showing results for 
Search instead for 
Did you mean: 
The HP Calculator Community Message Board is moving. While we prepare for the move, we are unable to accept new postings. During the move, you can look for help from other users by visiting https://www.hpmuseum.org/ . Or if you need technical support for your calculator visit: HP Calculators. .
ArchivedThis 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.
sagar_253
New member
1 0 0 0
Message 1 of 3
3,036
Flag Post

How to use PJL SET command?

HP Recommended

HI all,

 

I am using the PJL commands in one of my DOT net application.

The idea is we are using xps files and first we are converting these files into PCL file using the HP 1320n laserjet pcl 5 driver.

The converted PCL file contains the PJL command like below

%-12345X@PJL JOB NAME="C:\Users\sshinde\Desktop\New folder\SamplePrint.xps_first_320c6f430-c257-4f52-9d8e-7b0dfc432044.xps"
@PJL SET STRINGCODESET=UTF8
@PJL COMMENT "Symtrax XPS Driver (61.53.25.9); Windows 8 Enterprise N 6.2.9200.1; Unidrv 0.3.9200.16451"
@PJL COMMENT "Username: sshinde; App Filename: C:\Users\sshinde\Desktop\New folder\SamplePrint.xps_first_320c6f430-c257-4f; 8-6-2013"
@PJL DMINFO ASCIIHEX="0400040101020D101001153230313330383036313334363136"
@PJL SET HOLD=OFF
@PJL SET USERNAME="sshinde"
@PJL SET JOBNAME="C:\Users\sshinde\Desktop\New folder\SamplePrint.xps_first_320c6f430-c257-4f52-9d8e-7b0dfc432044.xps"
@PJL SET QTY=4
@PJL SET PROCESSINGTYPE="STAPLING"
@PJL SET PROCESSINGOPTION="NONE"
@PJL SET PROCESSINGBOUNDARY=MOPY
@PJL SET RESOLUTION=600
@PJL ENTER LANGUAGE=PCL

---pcl data here---

 

 

i used to convert these file and send the data in binary format to the printer.Its works well.

But i want to set some advanced printer option like DUPLEX is on ORIENTATION etc.

but if i modify this file then printer will print these file as it is instead of original document.

i have tried SET command before send these bytes data but the SET command is not applied on the printer.

One of the technical manual provided by HP, i found that SET requires one of the reset condition llike JOB command or RESET,printer restart.

so how i can SET advanced Printer option?

If i use SET command before and after sending byte data it doesnt work.i want each document should be printed with different options set by user.

which is only possible with help of SET command.

So can you please tell me the exact solution how to use the SET command?
Just let me know any other information is required.

this is very urgent,i got stuck to these probelms over week.

 

2 REPLIES 2
pcwizard
Level 13
Level 13
12,147 10,093 966 2,513
Message 2 of 3
Flag Post
HP Recommended

Hi sagar_253,

 

Refer to the links below which should assist you.

 

Printer Job Language Technical Reference Manual

 

HP LaserJet Series Printers - Common PJL Commands for Front Panel Settings and Default Page Formatti...

I am an HP employee.

Say Thanks by clicking the Kudos Star in the post that helped you.

Please mark the post that solves your problem as "Accepted Solution"
Was this reply helpful? Yes No
k15gatton
New member
1 1 0 0
Message 3 of 3
Flag Post
HP Recommended

You forgot the ESC character for the header and trailer. ESC = 0x1B (.NET HEX Value).

 

Just make %-12345X = ESC%-12345X. Then it will definitely work.

 

Hope this works.

 

Kurt

Tags (1)
Was this reply helpful? Yes No
ArchivedThis 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 Terms of Use and Rules of Participation