• ×
    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
From questions to kudos — grow your reputation as a tech expert with HP Support! Click here to sign up.
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

@dansdaduk wrote:
As sigs.pcl contains what is in Hancock.mac, that test is not really telling us much.

What happens if you send the contents of Hancock.mac to the printer, and then send the contents of Hancock.txt to the printer?

To confirm the validity of the test, power cycle the printer first to remove a previous copy of the macro that may be lingering in memory. 

HP Recommended

Well, I think our test would be complete if we send some text to the printer and expect to see the text AND the 4 signatures on the same page!

 

I tried to add some text to hancock.txt, but the text prints on a separate page.  I must be missing a code.  Could you please send me a modified version of hancock.txt that has "this is a test" somewhere on the page?  I'll execute it and see if both print on the same page.

 

Thank you,

Reed

HP Recommended

You can grab the revised hancock.txt now called hancock2.txt. Get the zipfile www.spectracolorservices.com/hpforum/hancock2.zip

HP Recommended

@Jim_Asman - good point about power-cycling the printer (although this would only be relevant if the download of the content of hancock.mac was somehow corrupted, and did not have the effect we think it should have).

 

... and here is a simple analysis of the content of the updated hancock2.txt file of PCL:

 

<Esc>E            Printer Reset
<Esc>&l2a         Page Size: Letter
       0o         Orientation: Portrait
       6d         Line Spacing (6 lines-per-inch)
       0e         Top Margin (0 lines)
       66F        Text Length (66 lines)
<Esc>&k2G         Line Termination: CR=CR, LF=CR+LF, FF=CR+FF
0x0a              <LF>: Line Feed
<Esc>*p200x       Cursor Position Horizontal (200 PCL units)
       500Y       Cursor Position Vertical   (500 PCL units)
<Esc>&f2y         Macro Control ID (identifer = 2)
       2X         Macro Control: Execute Macro
0x0a              <LF>: Line Feed
<Esc>*p1200x      Cursor Position Horizontal (1200 PCL units)
       500Y       Cursor Position Vertical   (500 PCL units)
<Esc>&f2y         Macro Control ID (identifer = 2)
       2X         Macro Control: Execute Macro
0x0a              <LF>: Line Feed
<Esc>*p200x       Cursor Position Horizontal (200 PCL units)
       1500Y      Cursor Position Vertical   (1500 PCL units)
<Esc>&f2y         Macro Control ID (identifer = 2)
       2X         Macro Control: Execute Macro
0x0a              <LF>: Line Feed
<Esc>*p1200x      Cursor Position Horizontal (1200 PCL units)
       1500Y      Cursor Position Vertical   (1500 PCL units)
<Esc>&f2y         Macro Control ID (identifer = 2)
       2X         Macro Control: Execute Macro
0x0a              <LF>: Line Feed
<Esc>(s0p         Primary Font: Spacing: Fixed
       10h        Primary Font: Pitch (10 characters per inch)
       0s         Primary Font: Style (Upright, solid)
       3b         Primary Font: Stroke Weight: Bold
       4099T      Primary Font: Typeface (4099 = Courier)
<Esc>*p800x       Cursor Position Horizontal (800 PCL units)
       1000Y      Cursor Position Vertical   (1000 PCL units)
This is a test!!!!!!!!!!!!!
0x0a              <LF>: Line Feed
<Esc>E            Printer Reset
0x0a              <LF>: Line Feed

 

 

HP Recommended

Reed,

 

If you look at the analysis of hancock2.txt posted by @dansdaduk, you will see that that the "This is a test" text is positioned before the final <esc>E  .  Most likely when you added text to hancock.txt you put it after the final <esc>E, probrbly just tacking it on to the end of the file, and that would certainly put it on a separate page.

 

HP Recommended

Dear Jim and Professor,

 

I truly admire your passion for what you do!  You guys don't even know me and you've been helping me so much with this problem...If eveyone were only half as helpful as you guys, in all aspects of life, we'd live in a much better place!

 

I think my problem is the fact that I am not using the software that you guys are using to generate the PCL.  Are you using mkpcl?  Please let me know so that I can purchase it today and be on my way 🙂

 

I will need to make a small (cropped) version of the signature like your John Hancock and make it a macro.  Then, my will call it the way you have done so in Hancock2.txt.

 

Thanks again, and keep up the awesome work!

Reed

HP Recommended
Jim used mkpcl to generate the encapsulated PCL macro.

But the simple PCL print jobs that we've been using to test calls to the macro are just 'hand-crafted' (in my case, using a hexadecimal editor).

What is probably at the crux of the problem is how your system is generating it's print jobs that you want to include the (macro used) signature.

We'd need to know EXACTLY what this is generating to be able to offer further advice.

i.e. you need to 'capture' (to a file) what your system is generating and sending to the printer; analysis if the capture file should reveal what is going on.
HP Recommended

@dansdaduk, Yes that encapsulates it very well!

 

@Reed_I

 

If your project is to fill in some fields on a preprinted check or certificate, I would try to generate the PCL5 code COMPLETELY outside of a printer driver. Where is the variable data stored? a database?

 

Really, you just need a flat ascii file with a bit of pcl code interspersed within it. Are these to be done in a   b-a-t-c-h   or always one at a time. If the former and there is only a single page per entry, then I would probably set the signature up as an automatic overlay so you don't have to call the marro on every page. Depending on all these things, you could probably create the final print file with a shell script.

 

 

 

 

 

 

 

 

 

 

HP Recommended

The issue is that the signature will vary, depending on the person who is running the program to print the certificate.  That's why I wanted to created about 10 macros, one for each user, and have the program call the appropriate macro to print the appripriate signature on the certificate.

 

The PCL code for the certificate is stored in a program (ascii) and fields are populated accordingly.

 

I do not HAVE TO create macros, if there is an easier and more efficient way to do this.

 

I'd appreciate any thoughts...

 

Reed

HP Recommended

There are a couple of wats to look at this. First, macros tend to be much tidier than inline code and far easier to manage.

 

You could generate macros for each user's signature, each with a unique macro ID. Combine them all into a single file that is sent to the printer regardless of the user. At runtime the appropriate macro ID is called depending on the user ID.

 

If you are on Unix, you can simply have the appropriate signature macro in a file in let's say    /usr/$name/sig.pcl

 

That way all the sigs would use the same macro ID, just the source of the file is different. I have had clients over the years that have used the Unix file system structure this way very effectively.

 

Is the body of the certificate preprinted or is the printer to supply that as well?

 

Finally, you can generate the macro using a pcl5 driver printed to file, and then editing the resulting pcl file. You have to cut out everything except the raster data stuff. Often, the image is positioned at a specific location on the page, which is easy enough to delete. What you have to be aware is that sometimes the driver will break the image up into several segments, each of which have their own positioning code. That has to be dealt with as well.

 

It really depends on how many and how often you need to do this. I had a customer that had images of about 200 different medical forms. They were well experienced, but even so they found it took them an hour or more to have a working macro. They installed mkpcl and the program stepped through all 200 files and created the necessary in twenty minutes.

 

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