Click or drag to resize

getWidth Method

Gets a value representing the width of this page in pixels.

Syntax
JavaScript
function getWidth();

Parameters

None

Return Value

Type: Integer

Returns the width of this page in pixels

Remarks

This width of the page is based on the page width when it is not rotated. To determine the current rotation of a page, see the getRotation Method.

Examples
JavaScript
  var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance
var myPage = myApi.getPageViewed();

//display the width and height of this page
  window.alert(myPage.getWidth() + " x " myPage.getHeight());
See Also