Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a watermark to a PDF using Print2PDF and Ghostscript 1

Status
Not open for further replies.

KarenLloyd

Programmer
Nov 23, 2005
141
GB
Hi

I'm working in VFP6 using ghostscript (print2pdf) code to convert postscript files (printed from VFP reports) to PDFs. What I need to do is add a "file copy" watermark to some of the PDFs.

I found some code online that is supposed to do this, so I have modified a copy of the print2pdf code for this purpose:

Code:
gs  -q -dNOPAUSE -dSAFER -dBATCH  -sOutputFile=result1.pdf -sDEVICE=pdfwrite  water1.ps  original.pdf

But it generates a two page document instead of watermarking the original document.

Does anyone have any experience or advice on how to get the watermarks working please?

Karen
 
Hi,
Is there any reason why you have to deal with VFP6?

if not, than switch imm to VFP9SP2 with HF.

Now since you have done,
use FoxyPreviewer.APP - which to be downloaded at VFPX and you can make use of the watermark option.

Regards,

Jockey(2)
 
Another option would be to use XFRX. This will generate the PDF file and add the watermark, without needing any other software (apart from VFP, of course). It should work fine with VFP 6.0.

See (But read the on-line documentation before committing yourself, as the watermark feature is a little obscure.)

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Hi Jockey

I don't think upgrading my system to VFP9 is as simple as that. But thanks for responding anyway.


Hi Mike

I wasn't aware of XFRX, so I will definately look deeper into that when there is more time available.

In the mean time I found PDF ToolKit (PDFTK) that does just the trick from a command line.

Now I just need to automate the printing of the PDFs.


Thank you once again for your help.

Kind regards

Karen
 
Karen,

do you have many Select...SQL statements in your application?
You need to check them for Group by, otherwise your applicatio should work. OK you will not benefit from some new goodies but since your application works why to worry. And you can benefit straight away from the new reportengine and FoxyPreviewer. What's more a much more stable application with lots of bugs fixed.

Realy it should not be so difficult.

Regards,

Jockey(2)

 
Hi Jockey(2)

I guess I really should into what all of the differences are between VFP6 and VFP9. It's not something that I can do just yet, but I will look for some more info.

Thanks for the tip.

Kind regards

Karen
 
Hi Karen,

VFP6 and VFP9 there are worlds and ages of difference between these 2 applications. Sure the GUI of both are the same and they also have both basicly the same commands, VFP9 a few more than VFP6. It is not only that you have to switch because of all the differences it is more that VFP9SP2 is much more stable and much more enhanced.
Take e.d. a look at the list of all the bugs fixed :
And once more, there is realy nothing to it, nothing at all, except for the Select statements with an Order by clause, you can run any VFP6 application with VFP9 with your eyes closed.

Jockey(2)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top