This method of the WPrintJob Class retrieves the dimensions of the page (in pixels).
public Dimension getPageDimension();
Returns the Dimension of the page (in pixels). If the setPageDimensions has not been called, the Dimension object returned is a default Dimension.