Adding a watermark to a page
Watermarks can be used in a variety of ways to make reports stand out. This recipe will show you how to add a "draft" watermark to the background of a report.
Getting ready
You must have PDFCreator installed on your machine. This recipe was tested with version 0.9.8 and 0.9.9 and is not guaranteed to work with future or previous releases of PDFCreator. PDFCreator requires the .NET Framework 1.1 to install the dll files used with this example.
You must also have Visual Studio 2005 or later installed on your machine in order to write the C# code for this recipe.
You should understand the Printing reports to PDF recipe from Chapter 10, Integration. This recipe builds on that one and the details will not be explained here. The codeunit for printing to PDF from the Integration chapter is included in this chapter as well.
How to do it...
Open a new text file.
Add the following code:
Option Explicit Dim Arguments Dim pdfforge Dim tools Dim fso Dim FilePath Dim ImagePath Dim...