-
×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
- Turning a PJL to a PCL macro

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

04-20-2016 03:14 PM
I concatenated the two and both printed (on separate pages). It seems to me that the problem is the &f2y0X, etc.
I have other macros running with no problems, but this one doesn't want to work with the converted image!
04-20-2016 03:24 PM
How is the printer connected to the printer?
Do this.
lp -o raw -dYourPrinter macro.pcl This puts the macro into the printer memory
lp -o raw -dYourPrinter simple.pcl This prints some text and calls the macro. You might want
<esc>&k2G in the setup.
Just a sanity check The <esc> represents the single character 0x1b or chr$(27) in decimal, right?
Quite possibly the redirection of macro.pcl might be the problem. Do the above first.
Yes the 16522 was a tyupo on my part.
If the above doesn't work, send both files with the next post. Believe me this is trivial stuff. When you are printing
raster graphics, you can get hurt by a 7bit connection etc.
04-20-2016 03:53 PM
Yes, definitely character 27 🙂 But, how do I attach files? It only allows for images to be attached. I even tried tricking it by changing the extension to .jpg, but it was smart enough to recognize my trick!!!
04-20-2016 04:29 PM
>> ... how do I attach files?
You can't attach files until you achieve a certain level of 'seniority' on these forums (unless perhaps you ask a moderator for assistance?).
In the meantime, you could send the files to Jim via an email to the contact address as given on his website.
You could also send a copy to me via the support 'at' pclparaphernalia.eu email address.
04-20-2016 05:26 PM
In the meantime, attached (within a .zip file) are some test files:
- pattern01.ovl - this is a relatively simple monochrome macro definition (ID = 2) to be used in the tests (as I don't have your macro file)
- snippet03.pcl - this is your simple PCL job which executes macro 2 - I've corrected the vertical position typo, and added a terminating <Esc>E reset.
- snippet03_with_pattern01_macro2.pcl - this is a concatenated file containing both the macro and the PCL 'job'.
The .zip also contain analyses of those three files.
04-21-2016 03:48 AM - edited 04-21-2016 03:49 AM
@Jim_Asman sent some test files within archives.
One archive is a standard .zip file, the other a *n*x style tar.gz archive; both contain the same files.
I can attach the former, but not the latter (the allowed extensions are jpg, gif, png, zip, pdf, doc, xls, docx, xlsx, ics, msg - strangely, .txt is not allowed!).
Attached is the standard .zip archive, but I've removed the .MAC file (this is presumably the original source logo/sig image file).
The archive contains the files:
- hancock.txt - this actually contains PCL - it is (I think) the basic simple print job, without the macro.
- sigs.pcl - this is a standalone print job which contains a macro definition (for the logo/sig), and some simple PCL which calls that macro.
- Analyses of these two files (I've added these).
04-21-2016 04:31 AM
@dansdaduk wrote:@Jim_Asman sent some test files within archives.
Attached is the standard .zip archive, but I've removed the .MAC file (this is presumably the original source logo/sig image file).
One point of clarification, though. The .mac file is a stand alone pcl macro definition, not an image file. While sending it to the printer will not "print" anything, it will load the macro into the printer memory for later use. This can be useful if your application provides no means of downloading a file to the printer on demand, you can simply print the file as a separate job and then later call the macro to actually put the image on paper.
If Reed_I can successfully print the sigs.pcl file, then he is well on his way.
04-21-2016 06:33 AM
>> ... The .mac file is a stand alone pcl macro definition, not an image file ...
I wasn't awake enough when I looked at the archive - I'd just got *n*x and Mac on my mind when I saw what was in the archive, and didn't look at the file content.
Attached is another file containing just that macro file, and an analysis of it.
04-21-2016 08:36 AM
Have received (from @Reed_I) a file macro.pcl with the description "... includes the signature AND some text ... the signature has a box around it ...".
I've attached (within a .zip file) this pcl file, together with an analysis, and scans of the output produced when the content is sent to a local LaserJet Pro 400 Colour MFP M475dn printer; note:
- The PCL does not include any macro control sequences.
- The first (and major part) is a definition of a large 300 dots-per-inch PCL raster image, which has a small 'sample' signature on a much larger background of vertical and horizontal lines.
- The second part is some simple PCL to print some short lines of text.
- The two parts are separated by an <Esc>E 'printer reset' escape sequence (which causes a page eject), which is why the two parts print on separate sheets.
- The font selection sequences used in the second part refer to Typeface = 3 (the old 'base' ID for Courier font); this has not been used on LaserJet devices since about LaserJet II days, and will probably result in the standard Courier typeface (ID = 4099) being used on modern devices.
I'll try modifying the pcl to use a macro (instead of the inline code) for the raster image, and see whether or not that makes any difference (other than just printing on a single sheet).
