Package org.icepdf.core.pobjects

Examples of org.icepdf.core.pobjects.PDimension


  private static BufferedImage toBufferedImage(Document document, int pageNumber,float scale,boolean transparent) {
    System.getProperties().put("org.icepdf.core.screen.background", "VALUE_DRAW_NO_BACKGROUND");
   
    Catalog cat = document.getCatalog();
    Page page = cat.getPageTree().getPage(pageNumber-1, document);
        PDimension sz = page.getSize(Page.BOUNDARY_CROPBOX, 0f, scale);

        int pageWidth = (int) sz.getWidth();
        int pageHeight = (int) sz.getHeight();

        BufferedImage image = new BufferedImage(pageWidth,
                pageHeight,
                transparent?BufferedImage.TYPE_INT_ARGB:BufferedImage.TYPE_INT_RGB);
        Graphics g = image.createGraphics();
View Full Code Here

TOP

Related Classes of org.icepdf.core.pobjects.PDimension

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.