Java Code Examples for net.sf.jasperreports.engine.JasperPrint#getPageHeight()
The following examples show how to use
net.sf.jasperreports.engine.JasperPrint#getPageHeight() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JRPrinterAWT.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * @deprecated To be removed. */ public static long getImageSize(JasperPrint jasperPrint, float zoom) { int width = (int) (jasperPrint.getPageWidth() * zoom) + 1; int height = (int) (jasperPrint.getPageHeight() * zoom) + 1; return width * height; }
Example 2
Source File: JRPrinterAWT.java From nordpos with GNU General Public License v3.0 | 5 votes |
/** * @deprecated To be removed. */ public static long getImageSize(JasperPrint jasperPrint, float zoom) { int width = (int) (jasperPrint.getPageWidth() * zoom) + 1; int height = (int) (jasperPrint.getPageHeight() * zoom) + 1; return width * height; }
Example 3
Source File: JRPrintServiceExporter.java From jasperreports with GNU Lesser General Public License v3.0 | 4 votes |
private void setOrientation(JasperPrint jPrint,PrintRequestAttributeSet printRequestAttributeSet) { if (!printRequestAttributeSet.containsKey(MediaPrintableArea.class)) { int printableWidth; int printableHeight; switch (jPrint.getOrientationValue()) { case LANDSCAPE: printableWidth = jPrint.getPageHeight(); printableHeight = jPrint.getPageWidth(); break; default: printableWidth = jPrint.getPageWidth(); printableHeight = jPrint.getPageHeight(); break; } printRequestAttributeSet.add( new MediaPrintableArea( 0f, 0f, printableWidth / 72f, printableHeight / 72f, MediaPrintableArea.INCH ) ); } if (!printRequestAttributeSet.containsKey(OrientationRequested.class)) { OrientationRequested orientation; switch (jPrint.getOrientationValue()) { case LANDSCAPE: orientation = OrientationRequested.LANDSCAPE; break; default: orientation = OrientationRequested.PORTRAIT; break; } printRequestAttributeSet.add(orientation); } }