I am rather new to Ghostscript and I have to admit I am struggling a bit.
I have several PDF files that I would like to merge into one PDF and add a
watermark. I would like to do this with a batch command.
Can anyone give me the syntax to do this in Ghostscript? Can it be done in
Ghostscript?
Thank you in advance for your help!
Kevin
What has this got to do with comp.lang.postscript ?
>
> Thank you in advance for your help!
>
>
> Kevin
>
>
--
Roger
"Roger Willcocks" <rk...@rops.org> wrote in message
news:bftkvl$pti$1$8300...@news.demon.co.uk...
> Can this be done in the PS language and then PDF'd?
Yes, assuming you have your original documents in PS format.
---snip---
%!PS
<<
/BeginPage {
save 200 100 moveto 60 rotate
/Times-Roman findfont 140 scalefont setfont
0.9 setgray (Watermark) show
restore
}
>> setpagedevice
(c:\\temp\\file1.ps) run
(c:\\temp\\file2.ps) run
(c:\\temp\\file3.ps) run
% etc
---snip---
works fine for me using Acrobat Distiller.
--
Roger
I have two other questions;
1.) When I add the watermark, Adobe Acrobat Reader 6.0 will always show the
document in portrait orientation. With out the watermark it will show it in
the orientation the parent application created it in (i.e. "B" size is shown
landscape). The latter is preferred. Can this be fixed in the below code?
2.) Is there a way to have the watermark mark always appear in a certain
position regardless of the page size (i.e. always centered regardless if the
page size is A3, B, Letter, etc).
Thanks again for everyone's help.
Kevin
"Roger Willcocks" <rk...@rops.org> wrote in message
news:bfudic$smj$1$8300...@news.demon.co.uk...
The other example:
<<
/BeginPage
{
pop
gsave
/_WM_str (Confidential) def
/Courier [30 0 0 40 0 0] selectfont
/DeviceRGB setcolorspace
0.6 0.8 1 setcolor
currentpagedevice/PageSize get aload pop
2 div exch 2 div exch translate 45 rotate
newpath
_WM_str stringwidth pop 2 div neg 0 moveto
_WM_str show
grestore
}bind
>>setpagedevice
Good luck,
Helge
--
H.Bli...@srz-berlin.de
H.Bli...@srz-berlin.com
H.Bli...@acm.org
First off there's a small error in the BeginPage code above: it should
pop one argument from the stack (it's the current page count):
/BeginPage {
pop save 200 100 moveto 60 rotate
/Times-Roman findfont 140 scalefont setfont
0.9 setgray (Watermark) show
restore
}
>> setpagedevice
>
> I have two other questions;
>
> 1.) When I add the watermark, Adobe Acrobat Reader 6.0 will always show the
> document in portrait orientation. With out the watermark it will show it in
> the orientation the parent application created it in (i.e. "B" size is shown
> landscape). The latter is preferred. Can this be fixed in the below code?
>
Without more details of your pages and environment (how are you
distilling the files?) it's difficult to diagnose your problem. The
most likely answer is that the BeginPage definition is clobbering an
existing one. The question is, where did it come from?
The following may do the trick:
<<
/BeginPage {
null exec
save 200 100 moveto 60 rotate
/Times-Roman findfont 140 scalefont setfont
0.9 setgray (Watermark) show
restore
} dup 0 currentpagedevice /BeginPage get put
>> setpagedevice
> 2.) Is there a way to have the watermark mark always appear in a certain
> position regardless of the page size (i.e. always centered regardless if the
> page size is A3, B, Letter, etc).
>
>
You can get the current page size using currentpagedevice, and use
that to rotate and scale your watermark.
>
> Thanks again for everyone's help.
>
>
> Kevin
>
--
Roger