To add an image to a page in a PDF, you can use the AddImage method. This method offers control over the area and opacity of the image being added.
The following snippet demonstrates how to add a watermark to each page in a document:
PDF support needs to be initialized first for this snippet to work. To get familiar with initializing IGNET, initializing PDF support, loading a PDF, saving a PDF, and terminating PDF support, try any one of the
tutorials.
The following snippet demonstrates how to specify the size and location of an image placed on each page in a document:
PDF support needs to be initialized first for this snippet to work. To get familiar with initializing IGNET, initializing PDF support, loading a PDF, saving a PDF, and terminating PDF support, try any one of the
tutorials.
Parameter |
Description |
opacity |
The opacity parameter allows you to control the transparency of the image being added to the page, where 0.0 is transparent and 1.0 is opaque. The default value is opaque. |
areaOnPage |
The areaOnPage parameter allows you to control the area on the page that the image should be placed. When either width or height equals 0.0, the entire page area is used. The default value is the entire page area. |