ASP.NET PDF Processing SDK Component

Crop

 

Crop specific part of PDF file.
 

bool Crop(
 string strSourceFile ,
 long iLeft ,
 long iTop ,
 long iRight,
 long iBottom,
 string strOutputFile 
)

 

Parameter
strSourceFile
the path of source pdf file.

iLeft
Specifies the logical left-coordinate of the starting point of the crop rectangle. ( unit is Centimeters. 10000 = 1 CM)

iTop
Specifies the logical top-coordinate of the starting point of the crop rectangle. ( unit is Centimeters. 10000 = 1 CM)

iRight
Specifies the logical right-coordinate of the starting point of the crop rectangle. ( unit is Centimeters. 10000 = 1 CM)

iBottom
Specifies the logical bottom-coordinate of the starting point of the crop rectangle. ( unit is Centimeters. 10000 = 1 CM)

strOutputFile
the path of the output pdf file.


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.Crop(strinputpath1, iLeft, iTop, iRight, iBottom, stroutpath);