• ×
    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

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
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"
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

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>.