Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.kit
Class PdfConverter

java.lang.Object
  extended bycom.aspose.pdf.kit.PdfConverter

public class PdfConverter
extends java.lang.Object

Represents a class to transform each page to image file from pdf file.


Constructor Summary
PdfConverter()
          The constructor of the PdfConverter object.
 
Method Summary
 void bindPdf(java.io.InputStream inputStream)
          Binds a Pdf Stream for convert.
 void bindPdf(java.lang.String inputFile)
          Binds a Pdf file for convert.
 void doConvert()
          Begins to transform a Pdf document to image files.
 int getEndPage()
          Gets endPage value.
 void getNextImage(java.io.OutputStream outputStream)
          Saves next page's image to stream with default image type - Jpeg.
 void getNextImage(java.io.OutputStream outputStream, ImageType imageType)
          Saves next page's image to stream with the given image type.
 void getNextImage(java.lang.String outputFile)
          Saves next page's image to file with default image type - Jpeg.
 void getNextImage(java.lang.String outputFile, ImageType imageType)
          Saves next page's image to file with the given image type.
 java.lang.String getPassword()
          Gets password.
 int getStartPage()
          Gets startPage value.
 boolean hasNextImage()
          Judges if it can get more images or not.
 void setEndPage(int endPage)
          Sets endPage value.
 void setPassword(java.lang.String password)
          Sets password, use this password to decrypt the pdf file.
 void setStartPage(int startPage)
          Sets startPage value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfConverter

public PdfConverter()
The constructor of the PdfConverter object.

Method Detail

setStartPage

public void setStartPage(int startPage)
Sets startPage value.

Parameters:
startPage - start position which you want to convert of the pdf file.

getStartPage

public int getStartPage()
Gets startPage value.

Returns:
start position which you want to convert of the pdf file.

setEndPage

public void setEndPage(int endPage)
Sets endPage value.

Parameters:
endPage - end position which you want to convert of the pdf file.

getEndPage

public int getEndPage()
Gets endPage value.

Returns:
end position which you want to convert of the pdf file.

setPassword

public void setPassword(java.lang.String password)
Sets password, use this password to decrypt the pdf file.

Parameters:
password - the input pdf file's password

getPassword

public java.lang.String getPassword()
Gets password.

Returns:
the input pdf file's password we have set.

bindPdf

public void bindPdf(java.lang.String inputFile)
             throws java.io.FileNotFoundException
Binds a Pdf file for convert.

Parameters:
inputFile - The pdf file to be convertted.
Throws:
java.io.FileNotFoundException

bindPdf

public void bindPdf(java.io.InputStream inputStream)
Binds a Pdf Stream for convert.

Parameters:
inputStream - The pdf Stream to be convertted.
Throws:
java.io.FileNotFoundException

doConvert

public void doConvert()
               throws java.lang.Exception
Begins to transform a Pdf document to image files.

Throws:
java.lang.Exception

getNextImage

public void getNextImage(java.lang.String outputFile)
                  throws java.lang.Exception
Saves next page's image to file with default image type - Jpeg.

Parameters:
outputFile - The file path and name to save the image.
Throws:
java.lang.Exception

getNextImage

public void getNextImage(java.io.OutputStream outputStream)
                  throws java.lang.Exception
Saves next page's image to stream with default image type - Jpeg.

Parameters:
outputStream - The stream to save the image.
Throws:
java.lang.Exception

getNextImage

public void getNextImage(java.lang.String outputFile,
                         ImageType imageType)
                  throws java.lang.Exception
Saves next page's image to file with the given image type.

Parameters:
outputFile - The file path and name to save the image.
imageType - The given image type.
Throws:
java.lang.Exception

getNextImage

public void getNextImage(java.io.OutputStream outputStream,
                         ImageType imageType)
                  throws java.lang.Exception
Saves next page's image to stream with the given image type.

Parameters:
outputStream - The stream to save the image.
imageType - The given image type.
Throws:
java.lang.Exception

hasNextImage

public boolean hasNextImage()
Judges if it can get more images or not. True is can and false is can't.

Returns:
can get more images or not.