es.caib.ibkey.bpm.pdf.helper
Class PDFToImageHelper

java.lang.Object
  extended by es.caib.ibkey.bpm.pdf.helper.PDFToImageHelper

public class PDFToImageHelper
extends java.lang.Object


Constructor Summary
PDFToImageHelper()
           
 
Method Summary
static java.awt.image.BufferedImage convertPDFToImage(com.sun.pdfview.PDFPage page, float maxHeight, float maxWidth)
          Converts the first page of a pdf file into a image
static void main(java.lang.String[] args)
           
static void saveImage(java.awt.image.BufferedImage im, java.lang.String destPath)
          Saves the image
static java.awt.image.BufferedImage toBufferedImage(java.awt.Image src)
          Converts Image to BufferedImage needed to be saved to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFToImageHelper

public PDFToImageHelper()
Method Detail

convertPDFToImage

public static java.awt.image.BufferedImage convertPDFToImage(com.sun.pdfview.PDFPage page,
                                                             float maxHeight,
                                                             float maxWidth)
                                                      throws java.io.IOException
Converts the first page of a pdf file into a image

Parameters:
buf -
maxHeight -
maxWidth -
Returns:
Throws:
java.io.IOException

saveImage

public static void saveImage(java.awt.image.BufferedImage im,
                             java.lang.String destPath)
                      throws java.io.IOException
Saves the image

Parameters:
im -
destPath -
Throws:
java.io.IOException

toBufferedImage

public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image src)
Converts Image to BufferedImage needed to be saved to a file

Parameters:
src -
Returns:

main

public static void main(java.lang.String[] args)
Parameters:
args - args[0]:path pdf d'entrada, args[1]:path jpg de sortida


Copyright © 2012 Direcció General de Tecnologia i Comunicacions. Govern de les Illes Balears. All Rights Reserved.