Image Viewer CP ActiveX Control

PDFEditMasking

 

Cover any unwanted page content (except annotations) with opaque rectangles.
 

Public Function PDFEditMasking( _
   ByVal strSourceFile  As String, _
   ByVal strOutputFile  As String, _
   ByVal iStartPage As Integer, _
   ByVal iEndPage As Integer, _
   ByVal iX As Integer, _
   ByVal iY As Integer, _
   ByVal iWidth As Integer, _
   ByVal iHeight As Integer, _
   ByVal iRectRed As Integer, _
   ByVal iRectGreen As Integer, _
   ByVal iRectBlue As Integer
 ) As Bool 

 

Parameter

strSourceFile
The source of PDF File.

strOutputFile
The output of PDF File.

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 iLeft, iTop, iWidth, iHeight unit is Centimeters. 10000 = 1 CM.)
iX
Specifies the x-coordinate of the upper-left corner of the rectangle to draw.

iY
Specifies the y-coordinate of the upper-top corner of the rectangle to draw.

iWidth
Specifies the width of the rectangle to draw.

iHeight
Specifies the height of the rectangle to draw.

iRectRed
Specifies the color value with red component of rectangle (0-255).

iRectGreen
Specifies the color value with green component of rectangle (0-255).

iRectBlue
Specifies the color value with blue component of rectangle (0-255). 

Return Value
Return true if successful, otherwise return false.


Example

   

Visual Basic Syntax
ImageViewer1.PDFEditMasking"c:\sourcepdf.pdf", "c:\output.pdf", -1, -1, 0,0,10000,50000, 255, 255, 255