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

Jim,

 

Yes, different macro IDs for different signatures...That's what I had in mind, too.

 

The body of the certificate is supplied (not preprinted).  I can email you the code, if you'd like!  I sent it Dan, and he kindly said he would look at it tomorrow. 

 

Reed

 

P.S.  I wish I could attach files here!

HP Recommended

Sure, send it to my email address on the website and I will have a look.

 

Here is the way I would do it.

 

Make the cert code, assuming PCL5, a macro. Construct the sig files as I suggested using the file system to differentiate between between signatures as macros with the same ID. Let's say the form is macro 100 and the signature is macro 101.

 

Now, within the macro 100 definition, have a call to macro 101. Enable the form, macro 100, as an automatic overlay just once at the head of the job, so then you only need to deal with the runtime text. Cat the two macro files together and send to the printer when you begin. We are presuming are sigs have an identical macro ID. If you insist on having unique macro IDs on the signatures, then you will have to have the logic to call the appropriate macro with the text and no macro 101 call in the macro 100 definition.

 

Make no mistake, you are going to have to learn a whole lot of PCL5 before you get this going. If you try to rely upon printer defaults, you will run into problems sooner rather than later, but let's see how you make out.

 

 

HP Recommended

Files received from @Reed_I with explanatory text:

 

"I have created a cropped and small version of the signature and put it in macro 2.  When I insert it in hancock2a.txt, it prints beautifully.  It prints on the same page as “This is a test!!!!!!!” and everything is good.  However, when I put it in form.pcl, it prints on a separate page.  To me, the 2 codes are similar and cannot find the error."

 

The supplied files:

 

  • sigs.pcl - contains the modified version of the signature as an encapsulated macro with identifier = 2.
  • hancock2a.txt - original simple PCL print job which calls that macro; signature prints on same page as text.
  • form.pcl - user-created PCL print job which also calls that macro; signature prints on separate page to text and boxes.

I've created a new file:

 

  • form_x01.pcl - slightly modified version of the user-created PCL print job which also calls that macro; signature prints on same page as text and boxes.

I've included all of these files (and analyses of each of them) in the attached .zip file.

 

Explanations to follow.

 

 

HP Recommended

Here is part of the analysis of the form.pcl file:

 

Capture.PNG

 

 

The sequence which causes the 'prints on separate page' issue (and which I've removed from the modified form_x01.pcl file) is that 'Page Length' one; why:

 

  • The job sets up the required page size as Letter (together with orientation, line spacing and top margin settings).
  • An attempt is made to set the PCL cursor position, but because the sequence is incorrect (the 'root' should be <Esc>*p) this will be ignored (it doesn't affect the 'extra page ' problem, but it will  affect the position of the signature.
  • The macro is then called - this causes the signature to be printed.
  • The next complex sequence includes (an obsolete method of) setting page size (by defining the required Page Length in lines (of the current VMI).
  • The printer obeys this sequence (it's still supported, even though it is obsolete) and believes that you are requesting a different page size (a length of 51 lines at 1/6 inch = 8.5 inch) to Letter (11 inch long).
  • So it ejects the current page (which already has the signature on it).
  • It then feeds another sheet (some printers may perhaps prompt to select a tray to support the 'new' page size), and prints the rest of the job.

 

HP Recommended

I think it was the change in orientation from portrait to landscape that caused the page to eject.

HP Recommended

@Jim_Asman wrote:

I think it was the change in orientation from portrait to landscape that caused the page to eject.


Plus, of course, the redeclaration of the page size with printable data already received. Either the orientation or page size would have called for a new page.

HP Recommended

>> ... I think it was the change in orientation from portrait to landscape that caused the page to eject ...

 

Jim

 

One of the (very few) occasions on which I have to disagree with you.

 

  • That would be the case if there were any 'page marking' escape sequences, or data, between the instances of the 'set orientation' escape sequences; but there are not.
  • There are 'page marking' escape sequences and data (courtesy of the executed macro) between the two sequences which determine page size.

Removal of (only) the second (obsolete) 'page size' sequence in form_x01.pcl , which prints on only one sheet on my local printers, confirms this.

HP Recommended

Thank you, Dan (and Jim)!

 

But why is it that I cannot change the position and orientation of the signature?  No matter what I do, it prints in the same place, and the orientation is incorrect.  I'm printing form_x01.pcl from your zipped file.

 

Reed

HP Recommended


@dansdaduk wrote:

>> ... I think it was the change in orientation from portrait to landscape that caused the page to eject ...

 

Jim

 

One of the (very few) occasions on which I have to disagree with you.

 

  • That would be the case if there were any 'page marking' escape sequences, or data, between the instances of the 'set orientation' escape sequences; but there are not.
  • There are 'page marking' escape sequences and data (courtesy of the executed macro) between the two sequences which determine page size.

Removal of (only) the second (obsolete) 'page size' sequence in form_x01.pcl , which prints on only one sheet on my local printers, confirms this.

Yes, you have to be correct; otherwise, you wouldn't be able to start a job with an orientation different from the default without getting a formfeed. When editing the file, I changed the opening sequence to <esc>&l2a1o6d0e51F and just deleted the second set of page formattig commands. 

 

HP Recommended

Reed,

 

The orientation of the signature was presumably determined by how the sheet was oriented when you scanned it. As @dansdaduk pointed out, you did have an error in the command that positioned the signature.

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