ChrisRChamberlain
Programmer
Hi
The following code watermarks a .pdf file when added to the front of a .ps file.
%!
% ==================================================================== draft.ps
% Redefine showpage so "DRAFT" is printed in gray on all pages. To
% change the intensity of the message, change the number in front of the
% command "setgray" 0=black, 1=white. Use real value in between.
%
% - Kevin O. Grover, <EMAIL: PROTECTED>
% Wed 06 May 1992 - Original Version
%
% Simply append this file to the begining of a PostScript file you want to
% have printed with the letters in the background.
%
% Usage: cat dsf.ps file.ps | lpr
% =============================================================================
% Define a Dictionary to keep the definitions in
/ShowDict 2 dict def
ShowDict begin
/oldshowpage /showpage load def % Save old showpage command
/draft { % Command to place DRAFT on page
gsave
/Helvetica-Bold findfont 220 scalefont setfont
.85 setgray 130 70 moveto 50 rotate (DRAFT) show
grestore
} bind def
end
% Redefine showpage (using command defined in ShowDict)
/showpage { ShowDict begin oldshowpage draft end } bind def
ShowDict begin draft end % So the first page has the text
It begins at the second page, not the first - what's missing to get it to start at page one?
HTH
Chris
The following code watermarks a .pdf file when added to the front of a .ps file.
%!
% ==================================================================== draft.ps
% Redefine showpage so "DRAFT" is printed in gray on all pages. To
% change the intensity of the message, change the number in front of the
% command "setgray" 0=black, 1=white. Use real value in between.
%
% - Kevin O. Grover, <EMAIL: PROTECTED>
% Wed 06 May 1992 - Original Version
%
% Simply append this file to the begining of a PostScript file you want to
% have printed with the letters in the background.
%
% Usage: cat dsf.ps file.ps | lpr
% =============================================================================
% Define a Dictionary to keep the definitions in
/ShowDict 2 dict def
ShowDict begin
/oldshowpage /showpage load def % Save old showpage command
/draft { % Command to place DRAFT on page
gsave
/Helvetica-Bold findfont 220 scalefont setfont
.85 setgray 130 70 moveto 50 rotate (DRAFT) show
grestore
} bind def
end
% Redefine showpage (using command defined in ShowDict)
/showpage { ShowDict begin oldshowpage draft end } bind def
ShowDict begin draft end % So the first page has the text
It begins at the second page, not the first - what's missing to get it to start at page one?
HTH
Chris