Package org.icepdf.core.pobjects

Examples of org.icepdf.core.pobjects.Document.dispose()


  }
 
  public Image toImage(byte[] input, int pageNumber, int scale, boolean transparent) throws PageException {
    Document document = toDocument(input);
        BufferedImage bi=toBufferedImage(document,pageNumber,scale/100f,transparent);
    document.dispose();
    return new Image(bi);
  }

  @Override
  public void writeImages(byte[] input, Set pages, Resource outputDirectory,
View Full Code Here


      }
    }
    finally{
     
    }
        document.dispose();
   
  }
 
  private static void writeImage(Document document, int page, Resource destination,String format, int scale,
      boolean overwrite, boolean goodQuality, boolean transparent) throws PageException, IOException {
View Full Code Here

                e.printStackTrace();
            }
            image.flush();
        }
        // clean up resources
        document.dispose();
        return image;
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.