ASP.NET PDF Processing SDK Component

Masking

 

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

bool Masking(
 string strSourceFile ,
 string strOutputFile ,
 int iStartPage ,
 int iEndPage ,
 long iX ,
 long iY ,
 long iWidth ,
 long iHeight ,
 int iRed ,
 int iGreen ,
 int iBlue 
)

 

Parameter
strSourceFile
the path of source pdf file.

strOutputFile
the path of output 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.

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.

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

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

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

Return Value
Return true - successful
Return false - failed

Example

   

C# Syntax
using PDFProcessingWrapper;

 PDFProcessing obj = new PDFProcessing();
string stroutpath = HttpContext.Current.Server.MapPath("~/output/" + myUniqueFileName);
string strinputpath1 = HttpContext.Current.Server.MapPath("~/uploads/" + strInputPDFFile1);
string strinputpath2 = HttpContext.Current.Server.MapPath("~/uploads/" + strInputPDFFile2);
bool bResult = obj.Masking(strinputpath1,stroutpath,iStartPage-1,iEndPage-1,iRectX, iRectY, iRectWidth, iRectHeight,iRectR, iRectG, iRectB);