-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Archived Topics
- Printers Archive
- Need to read a .pjl

Create an account on the HP Community to personalize your profile and ask a question

03-22-2017 07:26 AM
Hello,
As part of a challenge I am to read a .pjl file. The hint for the challenge is to "take this job and print it" and the file is named job.pjl
I have been beating my head against this for awhile and everyone else has given up. I'd like to figure this out.
Some of my guesses are that I need the print job name? Or, perhaps do something to view the document in human language?
Within the file, amongst the garbled nonsense is:
.%-12345X@PJL JOB
@PJL SET JOBATTR "OS =Windows"
@PJL SET JOBATTR "OS Version = Windows 8.1 6.3.9600.1"
@PJL SET JOBATTR "Render Type = InOS"
@PJL SET JOBATTR "Render Name = HP PCL6 Class Driver"
@PJL SET JOBATTR "Render Version=6.3.4.1"
@PJL SET COPIES=1
@PJL SET QTY=1
@PJL SET PROCESSINGTYPE="STAPLING"
@PJL SET PROCESSINGOPTION="NONE"
@PJL SET PROCESSINGBOUNDARY=MOPY
@PJL SET RESOLUTION=600
@PJL ENTER LANGUAGE=PCLXL
) HP-PCL XL;3;0;Comment Copyright(c) 1999-2011 Hewlett-Packard Corporation
Followed by a mess, and then EOJ.
So, if you were handed a .pjl file, what would you do with it? Somewhere on it is a "flag" that proves completion. Thanks for any direction.
03-22-2017 09:01 AM
Which program are you using to print that file? Have you tried changing the format of the file ?
Although I am an HP employee, I am speaking for myself and not for HP.
--Say "Thanks" by clicking the Kudos Star in the post that helped you.
--Please mark the post that solves your problem as "Accepted Solution"
03-22-2017 09:09 AM
I have tried changing the format to quite a few different styles. I've used word, notepad, notepad++ and have tried a .pcl reader as well (OpenPclViewer).
Any ideas of what program I should use? I've spent hours googling.
03-23-2017 07:37 AM
Assuming that the file starts with
%-12345X@PJL ....
then this:
- Is a standard print file (usually given a .prn extension);
- Appears (courtesy of the PJL ENTER LANGUAGE=PCLXL command) to have been produced by a PCL6 (PCL XL) printer driver.
To print it, you could just copy the content of the file direct to the printer port of a target printer (it must be one that supports PCL XL).
On a Windows system, and assuming that the printer is network-connected, the easiest way to do this would be to use the 'lpr' command in a Windows command-prompt session; for example:
lpr -S ip-address -P any myfile.pjl
where 'ip-address' is the IP-address of the target printer, and 'myfile.pjl' is the pathname of the file whose content you want to print.
You may need to enable certain Window 'features' in order to make the 'lpr' command available.
If you want to deconstruct the file, to see what 'commands' there are, use the PRN File Analyse tool in the PCL Paraphernalia application, available via http://www.pclparaphernalia.eu
04-05-2017 08:22 PM
Thank you dansdaduk for your reply. I had no luck with the PCL Paraphenlia tool.
I am wanting to print this file, but I keep getting garbage. I have used notepad++ to add the esc characters properly.
The original looks like this. Note the period where the esc sequence should be.
If possible, could I send this file to you to have a look at? This is for a fun challenge that no one seems to be able to get.
.%-12345X@PJL JOB
@PJL SET JOBATTR "OS =Windows"
@PJL SET JOBATTR "OS Version = Windows 8.1 6.3.9600.1"
@PJL SET JOBATTR "Render Type = InOS"
@PJL SET JOBATTR "Render Name = HP PCL6 Class Driver"
@PJL SET JOBATTR "Render Version=6.3.4.1"
@PJL SET COPIES=1
@PJL SET QTY=1
@PJL SET PROCESSINGTYPE="STAPLING"
@PJL SET PROCESSINGOPTION="NONE"
@PJL SET PROCESSINGBOUNDARY=MOPY
@PJL SET RESOLUTION=600
@PJL ENTER LANGUAGE=PCLXL
) HP-PCL XL;3;0;Comment Copyright(c) 1999-2011 Hewlett-Packard Corporation
Followed by garbage, followed by
.%-12345X.%-12345X@PJL JOB
@PJL SET JOBATTR "OS =Windows"
@PJL SET JOBATTR "OS Version = Windows 8.1 6.3.9600.1"
@PJL SET JOBATTR "Render Type = InOS"
@PJL SET JOBATTR "Render Name = HP PCL6 Class Driver"
@PJL SET JOBATTR "Render Version=6.3.4.1"
@PJL SET COPIES=1
@PJL SET QTY=1
@PJL SET PROCESSINGTYPE="STAPLING"
@PJL SET PROCESSINGOPTION="NONE"
@PJL SET PROCESSINGBOUNDARY=MOPY
@PJL SET RESOLUTION=600
@PJL ENTER LANGUAGE=PCLXL
) HP-PCL XL;3;0;Comment Copyright(c) 1999-2011 Hewlett-Packard Corporation
then more garbage before
1D...F0..UIB.%-12345X@PJL EOJ
.%-12345X
04-06-2017 04:19 AM - edited 04-06-2017 04:26 AM
>> ... I had no luck with the PCL Paraphenlia tool
The purpose of the PRN File Analyse tool is to 'decode' the content of a print file - but the analysis will only be meaningful if you have some understanding of the (in this case PCL XL) Page Description Language being used.
It doesn't show a display of what the printed page would look like - for that, use something like SwiftView, or Lincoln, or PCLWorks.
By the way, the reason that the OpenPCL viewer did not work is that that application only understands (a rather old version of) PCL5 - it does not support PCL6 (a.k.a. PCL XL).
Did you also try the PRN File Print tool, to 'send' the content of the file to a suitable (PCL6 supporting) target printer?
>> ... I have used notepad++ to add the esc characters properly
i don't understand what you mean by this, since the file already appears (from what you've posted so far) to be a 'complete' print job.
Nothing needs to be added to it, and doing so will almost certainly corrupt it.
>> ... If possible, could I send this file to you to have a look at?
By all means send a copy of the file to me, via the support mailbox 'at' pclparaphernalia.eu
04-06-2017 06:17 AM
Thank you for keeping up with my post.
I did try print to file a number of times with an installed printer driver for pcl6 but I keep getting the same garbage when I then read the prn file with PCLWorkx.
I am very interested in how this is supposed to be done. PCL and PJL are very near to me.
I'll send you an email. Thank you much for offering to look at it.
04-06-2017 08:01 AM - edited 04-06-2017 08:04 AM
I've received your sample file.
The bad news is that the data is totally corrupt.
When you originally stated:
Within the file, amongst the garbled nonsense is:
.%-12345X@PJL JOB
I assumed (erroneously as it turns out) that you were using "." as a 'placeholder' for the non-graphic Escape control-code character (the character with decimal code 27, or hexadecimal 1B) when you originally posted the details in this question.
But your file actually contains a "." character (the character with decimal code 46, or hexadecimal 2E) as its first byte.
This implies that the original 'print ready' file has been processed in some way such that the non-ASCII Escape control-code byte has been converted to a "." character.
If it was just this one byte (and a corresponding one towards the end of the file) that had been erroneously replaced, it would have been relatively simple to change these few occurrences back.
Unfortunately, PCL XL 'instructions', which make up the bulk of the print job (the PJL header is just a few job-level commands) can contain many different byte values which are non-ASCII - i.e. they are not in the range decimal 20 - 126, (or hexadecimal 20 - 7E).
Whatever created this file (presumably from a valid print-ready file) appears to have changed ALL of the non-ASCII bytes (thousands of them!) to "." characters, so there is no way of knowing what the original byte values were.
Are you sure that this is the original 'print-ready' file (it can't have been).
04-06-2017 08:07 AM
The file I sent you is a fresh copy of the file. I have not even opened it.
Questions:
- Is it possible that the uploader accidentally damaged it? Or, it is possible that this was intentional and part of the challenge. But, that'd explain why a couple 100 people have not been able to solve it.
- I suppose there is nothing to repair the corruption?
- When I do download it, while it is a .pjl file, my computer registers it as a file that is opened with Word. Could this cause an issue?
Thank you very much for looking into this too. I appreciate your time.
04-06-2017 08:19 AM
>> ... Is it possible that the uploader accidentally damaged it?
Quite likely, especially if it was transfered as a Text file rather than as a Binary file.
>> ... Or, it is possible that this was intentional and part of the challenge. But, that'd explain why a couple 100 people have not been able to solve it.
Again possible, but I don't think that anyone would be able to solve it, since the thousands of "." characters in the file could each have been one of about 150 or so different values originally.
>> ... I suppose there is nothing to repair the corruption?
In my view, no.
>> ... When I do download it, while it is a .pjl file, my computer registers it as a file that is opened with Word. Could this cause an issue?
I wouldn't think so, although it's a bit odd to have an association between .pjl and Word.
The only thing that such associations normally do is to provide a link to a default application with which to open a file of the associated type.
