PCL - printing a text "watermark" diagonally across the page (2763 Views)
Reply
sbb Honor Student
Honor Student
sbb
Posts: 4
Registered: ‎11-11-2009
Message 1 of 8 (2,763 Views)
Accepted Solution

PCL - printing a text "watermark" diagonally across the page

Our company uses an old "RawPrintLib" DLL to print documents.  Pages are built by calling routines that populate a byte array with PJL/PCL commands.  It has functions for adding text, drawing lines, drawing boxes, etc.

Up till now, when i needed to modify a document, I was able to figure out what to do.

However, I have been asked to add the text "Estimate Only" as a diagonal watermark across the page, and I am not sure how to proceed.  My questions are:

1. Would this kind of watermark be best generated as text that is drawn, or as a picture that is displayed as a watermark?
2. How would I implement the solution using PCL commands?

Thanks!
 
Intern
irRufus
Posts: 27
Registered: ‎11-11-2009
Message 2 of 8 (2,749 Views)

Re: PCL - printing a text "watermark" diagonally across the page

This is very easy.  I'd strongly suggest sending it as an outline or outline/shadow font for speed...

 

PCL5 Quick Reference:

http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13205/bpl13205.pdf

 

Enjoy

sbb Honor Student
Honor Student
sbb
Posts: 4
Registered: ‎11-11-2009
Message 3 of 8 (2,735 Views)

Re: PCL - printing a text "watermark" diagonally across the page

If I understand you correctly, you are suggesting I:

  1. Set the font to some large Outline Shadow font

  2. Set the cursor position

  3. Rotate the text to print diagonally (?)

  4. Print the text. 

 

Step 1 would be something like:

        <ESC>(s1p24v160s-3b16602T
Where
      1p - proportional spacing
      24v - height (bigger point size - will determine later)
      160s - font style (Outline Shadowed per suggestion)
      -3b - stroke weight (Light (right?))
      16602T - typeface (Arial)

 

That makes sense to me.  However, I cannot figure out Step 3 - I can only find commands to rotate text in 90 degree increments.

 

Does my Font setting make sense, and do you have any suggestions for a diagonal (45 degree) print orientation?

 

Thanks!

  

 

 

Intern
irRufus
Posts: 27
Registered: ‎11-11-2009
Message 4 of 8 (2,733 Views)

Re: PCL - printing a text "watermark" diagonally across the page

Sounds good to me...

 

It does look like PCL5 only does 90 degree rotations and I'm unsure if newer revisions allow other rotational increments.  Therefore, why not just step the letters?  Something like this...

 

E

   S

      T

        I

          M

             A

                T

                  E

sbb Honor Student
Honor Student
sbb
Posts: 4
Registered: ‎11-11-2009
Message 5 of 8 (2,727 Views)

Re: PCL - printing a text "watermark" diagonally across the page

Well...

 

I think I'll see how it looks across the middle of the page first - like

 

    ESTIMATE

       ONLY

 

I'll try this first, and go to the stepping if needed.

 

Thanks very much for the document links and the help.

Intern
irRufus
Posts: 27
Registered: ‎11-11-2009
Message 6 of 8 (2,700 Views)

Re: PCL - printing a text "watermark" diagonally across the page

You're welcome, glad to be of some help.
sbb Honor Student
Honor Student
sbb
Posts: 4
Registered: ‎11-11-2009
Message 7 of 8 (2,595 Views)

Re: PCL - printing a text "watermark" diagonally across the page

So, I have gotten around to trying/testing what was discussed:

 

I sent text to the Printer preceded by: 

        <ESC>(s1p96v160s-3b16602T
Where
      1p - proportional spacing
      96v - height (bigger point size - will determine later)
      160s - font style (Outline Shadowed per suggestion)
      -3b - stroke weight (Light (right?))

      16602T - typeface (Arial) 

 

The submitted text was printed, but did not:

  A) print as outline shadowed

  B) print with a light stroke

  C) print as Arial font

 

 

So is there something I need to be doing other than the above?

 

Thanks very much!

-Scott 

Student
Grace_2012
Posts: 1
Registered: ‎01-18-2012
Message 8 of 8 (965 Views)

Re: PCL - printing a text "watermark" diagonally across the page

Hello

 

I have the same request as yours

 

i know less about PCL, i try to do like your suggestion, but it can't print out the watermarked and only the big fond

 

i paste my code, please help me check it, thanks!

 

have a nice day!

 

CHAR(27) + '(s1p96v160s-3b16602T' +
       CHAR(27) + '*p800x1000Y' + 'GRACE' +

 

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation