org.pdfbox.util
Class PDFImageWriter

java.lang.Object
  extended byorg.pdfbox.util.PDFStreamEngine
      extended byorg.pdfbox.util.PDFImageWriter

public class PDFImageWriter
extends PDFStreamEngine

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

Version:
$Revision: 1.1 $
Author:
Daniel Wilson

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)
           
 
Methods inherited from class org.pdfbox.util.PDFStreamEngine
getColorSpaces, getCurrentPage, getFonts, getGraphicsStack, getGraphicsState, getGraphicsStates, getResources, getTextLineMatrix, getTextMatrix, getXObjects, processOperator, processOperator, processStream, processSubStream, registerOperatorProcessor, resetEngine, setColorSpaces, setFonts, setGraphicsStack, setGraphicsState, setGraphicsStates, setTextLineMatrix, setTextMatrix, showCharacter, showString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFImageWriter

public PDFImageWriter()
               throws IOException
Instantiate a new PDFImageWriter object.

Throws:
IOException - If there is an error loading the properties.

PDFImageWriter

public PDFImageWriter(Properties props)
               throws IOException
Instantiate a new PDFImageWriter object. Loading all of the operator mappings from the properties object that is passed in.

Parameters:
props - The properties containing the mapping of operators to PDFOperator classes.
Throws:
IOException - If there is an error reading the properties.
Method Detail

WriteImage

public boolean WriteImage(PDDocument document,
                          String imageType,
                          String password,
                          int startPage,
                          int endPage,
                          String outputPrefix)
                   throws IOException
Throws:
IOException