Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I have written a Visual Basic Application, that exports what a user as written to PDF use the Crystal Report Viewer. My question is once the PDF has been created can another application open the PDF and add a watermark to it? This watermark would be temporary it would not actually add it to the image and the watermark would only be visible when this PDF is viewed in this application. And if the user prints out the PDF with this application it would print out the PDF with the watermark. Any suggestions on how to accomplish this would be grealy appreciated.
Posted

Hello,

 

I passed that situation too, and i got PDFTK tool to solve that.

 

Download it here :http://www.pdfhacks.com/pdftk/pdftk-1.12.exe.zip

 

after you call pdftk.exe and pass it the parameters for watermark printing.

 

The program uses, the original pdf file and the watermark pdf file that will produce the final pdf watermarked.

 

Besides wtermark feature, with this you can set pwds, encriptions, etc.

 

pretty nice tool, indeed.

 

a simple example how i call it from my C# code:

ProcessStartInfo startInfo = new ProcessStartInfo("pdftk.exe");
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = "\"C:\\Temp\\MyOriginalPdfFile.pdf\" background  "C:\\Temp\\MyWatermarkPdfFile.pdf\" output \"C:\\Temp\\MyFinalWatermarkedPdfFile.pdf\"";
Process.Start(startInfo);

 

I hope it can help u.

 

best regards,

Tiago Teixeira

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...