|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pdfbox.util.PDFStreamEngine
org.apache.pdfbox.util.PDFImageWriter
public class PDFImageWriter
This class will take a PDF document and strip out all of the text and ignore the formatting and such. Please note; it is up to clients of this class to verify that a specific user has the correct permissions to extract text from the PDF document.
Patterned after PDFTextStripper.
| Constructor Summary | |
|---|---|
PDFImageWriter()
Instantiate a new PDFImageWriter object. |
|
PDFImageWriter(Properties props)
Instantiate a new PDFImageWriter object. |
|
| Method Summary | |
|---|---|
boolean |
writeImage(PDDocument document,
String imageType,
String password,
int startPage,
int endPage,
String outputPrefix)
Converts a given page range of a PDF document to bitmap images. |
boolean |
writeImage(PDDocument document,
String imageFormat,
String password,
int startPage,
int endPage,
String outputPrefix,
int imageType,
int resolution)
Converts a given page range of a PDF document to bitmap images. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PDFImageWriter()
public PDFImageWriter(Properties props)
throws IOException
props - The properties containing the mapping of operators to PDFOperator
classes.
IOException - If there is an error reading the properties.| Method Detail |
|---|
public boolean writeImage(PDDocument document,
String imageType,
String password,
int startPage,
int endPage,
String outputPrefix)
throws IOException
document - the PDF documentimageType - the target format (ex. "png")password - the password (needed if the PDF is encrypted)startPage - the start page (1 is the first page)endPage - the end page (set to Integer.MAX_VALUE for all pages)outputPrefix - used to construct the filename for the individual images
IOException - if an I/O error occurs
public boolean writeImage(PDDocument document,
String imageFormat,
String password,
int startPage,
int endPage,
String outputPrefix,
int imageType,
int resolution)
throws IOException
document - the PDF documentimageFormat - the target format (ex. "png")password - the password (needed if the PDF is encrypted)startPage - the start page (1 is the first page)endPage - the end page (set to Integer.MAX_VALUE for all pages)outputPrefix - used to construct the filename for the individual imagesimageType - the image type (see BufferedImage.TYPE_*)resolution - the resolution in dpi (dots per inch)
IOException - if an I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||