What is actually slow - converting or resizing?
2014-03-06 14:02 GMT+01:00 Antonio González <[email protected]>: > Hi > > When i convert a PDF file a Image is very slow 4 o 5 secs. > > my code is > > > String fichero = "C:\\guiaalfresco.pdf"; > PDDocument pdfDocument= null; > try { > File file = new File(fichero); > pdfDocument = PDDocument.load(file); > List pages = pdfDocument.getDocumentCatalog().getAllPages(); > if (pages.size()>0){ > // Captura la primera página del PDF > PDPage page = (PDPage) pages.get(0); > // Convierta la página PDF a Image > BufferedImage image = page.convertToImage(BufferedImage.TYPE_INT_BGR,200 ); > pdfDocument.close(); > File outputfile = new File("c:\\saved.png"); > BufferedImage imagen=resizeImage(image, 200); > ImageIO.write(imagen, "png", outputfile); > } > } catch (IOException e) { > e.printStackTrace(); > } > -- BEKK Open http://open.bekk.no TesTcl - a unit test framework for iRules http://testcl.com

