|
Add the Image Watermark to specific page of existing PDF File without displaying or decoding any of the images.
Public Function PDFEditAddWatermarkImage( _ ByVal strSourceFile As String, _ ByVal strOutputFile As String, _ ByVal strImageFile As String, _ ByVal iStartPage As Integer, _ ByVal iEndPage As Integer, _ ByVal iX As Integer, _ ByVal iY As Integer, _ ByVal iScaleX As Integer, _ ByVal iScaleY As Integer ) as Bool
|
Parameter
strSourceFile The source of PDF File.
strOutputFile The output of PDF File.
strImageFile The watermark image file, it support JPEG or TIF file only.
iStartPage Specifies start of page number. The first page is 0. If you want to apply to all pages, set iStartPage and iEndPage =-1.
iEndPage Specifies end of page number.
The iX, iY unit is Centimeters. 10000 = 1 CM. iX Specifies the x-coordinate of the upper-left corner of the image to draw.
iY Specifies the x-coordinate of the upper-top corner of the image to draw.
iScaleX Specifies the scaling factor in x direction. 1.0 is 100% of image 2.0 is 200% of image 0.5 is 50% of image.
iScaleY Specifies the scaling factor in y direction. 1.0 is 100% of image 2.0 is 200% of image 0.5 is 50% of image.
Return Value Return true if successful, otherwise return false.
Example
|
Visual Basic Syntax ImageViewer1.PDFEditAddWatermarkImage "c:\sourcepdf.pdf", 1, "c:\output.pdf", "c:\yourimage.jpg" , -1, -1, 10000, 50000, 0.5,0.5
|
|
|