Skip to main content
Participant
October 13, 2009
Question

Watermark PS programming

  • October 13, 2009
  • 2 replies
  • 1881 views

My custom application generates Postscript files that are then distilled to create a PDF file as final output.

I know how to program a watermark in Postscript using setpagedevice.

However, I cannot find a way to dynamically make the watermark appear only at printing time. I'd like to emulate (programmatically in PS, or pdfmark)  the Acrobat Professional capability whereas you can set a watermark to appear only at printing time.

Thanks for your suggestions!

This topic has been closed for replies.

2 replies

Participating Frequently
October 19, 2009

There was an Acrobat feature "Write Through PostScript" annotation which could be used

to accomplish just that (provided the destination printer speaks PostScript level 2 at least).

But I think this feature has been deprecated as of Acrobat 5 (PDF 1.4), and I'm not sure

if more recent Acrobat versions even support this.

Helge

Participating Frequently
October 19, 2009

You could for example print the watermark if not a reconized non-printer like distiller or gs

or vice versa print if a known printer.

WaterMark

{

  currentsystemparams /PrinterName known
  {currentsystemparams /PrinterName get } { (Unknown ) } ifelse

  % string compare etc. to do or skip watermark

} def

<<

  /EndPage { % WaterMark here }
>> setpagedevice

Ed