Click or drag to resize

cropPage Method

Crops this page in the currently loaded document.

Syntax
JavaScript
function cropPage(left, right, top, bottom);

Parameters

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.

Return Value

Type: Boolean

true if operation completed successfully; otherwise, false.

Remarks

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.

Examples
JavaScript
  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);
See Also

Other Resources