Products   Support   Download   Contact

USING THE SCRIPTSERVER® PAN CONFIGURABLE WATERMARK RESOURCE

Contents | Index | About the Icons

Abstract

The ScriptServer® PAN Printing System (PAN) product supports advanced form creation and imaging capabilities. This memo describes one such technique.

Techniques Covered In This Memo

This memo covers:

The form will work with plaintext as well as most PostScript jobs and Microsoft Windows applications.

You may also find the following pages of interest:

Creating the Form

The form requires one resource. Create the resource and the form as follows. Each step will be described in detail in a separate following section:

  1. Create a special Other Resource with PAN Administration -> Resources -> create resource. This resource is a PostScript language snippet whose function is unique to ScriptServer PAN.
  2. Create a Form with PAN Administration -> Manage forms -> create form and add the resource to it.

Creating the Resource

The resource is a PostScript snippet whose functionality is tied to specific capabilities of the PostScript code generated by the ScriptServer PAN Printing System. It is a resource of type Other. In ScriptServer PAN version 1.5.1, this resource is named pan$watermark in the global resource set.

To create the resource (for versions prior to 1.5.1), create a new resource of type Other, and cut and paste the following PostScript code into it. For compatibility with later versions of PAN, name the resource pan$watermark.

So that you may use multiple forms that slightly different versions of the watermark (such as a DRAFT watermark and a CONFIDENTIAL watermark,) we recommend that you create a new resource, then use the clone feature to make a copy of the pan$watermark resource for your new form.

%!PS-Adobe
% Generic watermarking resource for ScriptServer PAN
% (c) 2006 GrayMatter Software Corporation
userdict /pan$watermark 10 dict put
pan$watermark begin
/theText (DRAFT) def
/theFont /Helvetica-Bold def
/theSize 85 def
/grayness .65 def
/angle 25 def
/filled true def
end
%-------------
currentglobal true setglobal
pan$global begin 
/BeginPageHook {
pan$watermark begin
currentpagedevice /PageSize get
dup 0 get /pw exch def
1 get /ph exch def
gsave
theFont findfont theSize scalefont setfont
grayness setgray
0 0 moveto theText true charpath pathbbox 3 -1 roll sub /h exch def exch sub /w exch def
pw 2 div angle cos w mul 2 div sub h 90 angle sub cos mul 2 div add
ph 2 div angle sin w mul 2 div sub h 2 div sub translate
newpath angle rotate 0 0 moveto theText
filled {show} {true charpath stroke} ifelse
grestore
end
} def
BeginPageHook
end
setglobal

Be sure to leave a blank line at the end of the resource!

Creating the Form

Create a Form and add the resource to it.

Changing Watermark Attributes

The following lines (the lines repeated below which are not grayed out) in the PostScript code can be altered to change the text, size, font, density and fill state:

%!PS-Adobe
% Generic watermarking resource for ScriptServer PAN
% (c) 2006 GrayMatter Software Corporation
userdict /pan$watermark 10 dict put
pan$watermark begin
/theText (DRAFT) def
/theFont /Helvetica-Bold def
/theSize 85 def
/grayness .65 def
/angle 25 def
/filled true def
end
%-------------

parameter

value in example

allowable range

comments

theText DRAFT any reasonably short text string A smaller font size specified with theSize will allow for a longer string to be used.
theFont Helvetica-Bold an appropriate font name Certain font names are standard (the "gang of thirteen"). Certain printers may have additional resident fonts, plus PAN has the ability to download fonts.
theSize 85 20 to 150 These represent reasonable practical limits. Values outside these ranges may also work.
grayness .65 .01 to .99 0 represents black (opaque), while 1 represents white (transparent).
angle 25 0 to 90 The angle in degrees which the text should be rotated.
filled true true or false Indicates whether the text should be filled (true) or simply outlined (false).

 

Advanced Techniques

Because of PAN's late binding and resource instance inheritance scheme, some advanced techniques are possible if resource instances are defined in the queue-specific resource sets for printers, or in a shared resource set instead of in the default global resource set. For both of these examples, there is a single form which references a single named resource, as described above.

Location-Based watermarks: Queue Specific Resources

If resource instances for the named resource are created with different text in the queues associated with different printers, then jobs printed on the form will have different text depending on which printer they are ultimately printed on.

Day-Of-Week watermarks: Shared Resource Sets

If shared resource sets are created for the days of the week and day-specific resource instances are created in them, then by changing the shared resource set associated with a queue (on a daily basis) it is possible to change the text depending on the day of the week.

© 2020 GrayMatter Software Corporation