cropPage Method |
Crops this page in the currently loaded document.
function cropPage(left, right, top, bottom);
left
Type: Integer The number of pixels to crop out on the left side of this page.right
Type: Integer The number of pixels to crop out on the right side of this page.top
Type: Integer The number of pixels to crop out on the top of this page.bottom
Type: Integer The number of pixels to crop out on the bottom of this page.Type: Boolean
true if operation completed successfully; otherwise, false.If all parameters are set to 0, any previous page crops are undone.
No parameters can be less than 0.
left + right must be less than getWidth Method.
top + bottom must be less than getHeight Method.
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance //crop the current page (1 inch on each side, assuming a RenderDpi of 100) myApi.getPageViewed().cropPage(100, 100, 100, 100);