cz.muni.pdfjbim
Class PdfImageProcessor

java.lang.Object
  extended by cz.muni.pdfjbim.PdfImageProcessor

Deprecated.

public class PdfImageProcessor
extends Object

This will read a pdf and extract images (names of images are stored in list and put back their compressed version)

Author:
Radim Hatlapatka (hata.radim@gmail.com)

Constructor Summary
PdfImageProcessor()
          Deprecated.  
 
Method Summary
 void extractImages(File pdfFile, String password, Set<Integer> pagesToProcess, Boolean binarize)
          Deprecated. This method extracts images from PDF
 void extractImages(InputStream is, String password, Set<Integer> pagesToProcess, Boolean binarize)
          Deprecated. This method extracts images by going through all COSObjects pointed from xref table
 void extractImages(String pdfFile, String password, Set<Integer> pagesToProcess, Boolean binarize)
          Deprecated. This method extracts images from PDF
 void extractImagesUsingPdfObjectAccess(String pdfFile, String password, Set<Integer> pagesToProcess, Boolean silent, Boolean binarize)
          Deprecated. -- do not use doesn't work properly yet This method extracts images by going through PDF tree structure
 void extractImagesUsingPdfParser(InputStream is, String prefix, String password, Set<Integer> pagesToProcess, Boolean binarize)
          Deprecated. This method extracts images by going through all COSObjects pointed from xref table
 List<String> getNamesOfImages()
          Deprecated.  
 List<PdfImageInformation> getOriginalImageInformations()
          Deprecated.  
 String getUniqueFileName(String prefix, String suffix)
          Deprecated. get file name that is not used right now
 void replaceImageUsingIText(String pdfName, OutputStream os, Jbig2ForPdf imagesData)
          Deprecated. replace images by they recompressed version according to JBIG2 standard positions and image data given in imagesData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfImageProcessor

public PdfImageProcessor()
Deprecated. 
Method Detail

getNamesOfImages

public List<String> getNamesOfImages()
Deprecated. 
Returns:
names of images in a list

getOriginalImageInformations

public List<PdfImageInformation> getOriginalImageInformations()
Deprecated. 
Returns:
list of informations about images

extractImages

public void extractImages(File pdfFile,
                          String password,
                          Set<Integer> pagesToProcess,
                          Boolean binarize)
                   throws PdfRecompressionException
Deprecated. 
This method extracts images from PDF

Parameters:
pdfFile - input PDF file
password - password for access to PDF if needed
pagesToProcess - list of pages which should be processed if null given => processed all pages -- not working yet
binarize - -- enables processing of nonbitonal images as well (LZW is still not processed because of output with inverted colors)
Throws:
PdfRecompressionException - if problem to extract images from PDF

extractImages

public void extractImages(String pdfFile,
                          String password,
                          Set<Integer> pagesToProcess,
                          Boolean binarize)
                   throws PdfRecompressionException
Deprecated. 
This method extracts images from PDF

Parameters:
pdfFile - name of input PDF file
password - password for access to PDF if needed
pagesToProcess - list of pages which should be processed if null given => processed all pages -- not working yet
binarize - -- enables processing of nonbitonal images as well (LZW is still not processed because of output with inverted colors)
Throws:
PdfRecompressionException - if problem to extract images from PDF

extractImages

public void extractImages(InputStream is,
                          String password,
                          Set<Integer> pagesToProcess,
                          Boolean binarize)
                   throws PdfRecompressionException
Deprecated. 
This method extracts images by going through all COSObjects pointed from xref table

Parameters:
pdfFile - name of input PDF file
password - password for access to PDF if needed
pagesToProcess - list of pages which should be processed if null given => processed all pages -- not working yet
binarize - -- enables processing of nonbitonal images as well (LZW is still not processed because of output with inverted colors)
Throws:
PdfRecompressionException - if problem to extract images from PDF

extractImagesUsingPdfParser

public void extractImagesUsingPdfParser(InputStream is,
                                        String prefix,
                                        String password,
                                        Set<Integer> pagesToProcess,
                                        Boolean binarize)
                                 throws PdfRecompressionException
Deprecated. 
This method extracts images by going through all COSObjects pointed from xref table

Parameters:
is - input stream containing PDF file
password - password for access to PDF if needed
pagesToProcess - list of pages which should be processed if null given => processed all pages -- not working yet
binarize - -- enables processing of nonbitonal images as well (LZW is still not processed because of output with inverted colors)
Throws:
PdfRecompressionException - if problem to extract images from PDF

extractImagesUsingPdfObjectAccess

public void extractImagesUsingPdfObjectAccess(String pdfFile,
                                              String password,
                                              Set<Integer> pagesToProcess,
                                              Boolean silent,
                                              Boolean binarize)
                                       throws PdfRecompressionException
Deprecated. -- do not use doesn't work properly yet This method extracts images by going through PDF tree structure

Parameters:
pdfFile - name of input PDF file
password - password for access to PDF if needed
pagesToProcess - list of pages which should be processed if null given => processed all pages -- not working yet
silent - -- if true error messages are not written to output otherwise they are
binarize - -- enables processing of nonbitonal images as well (LZW is still not processed because of output with inverted colors)
Throws:
PdfRecompressionException - if problem to extract images from PDF

getUniqueFileName

public String getUniqueFileName(String prefix,
                                String suffix)
Deprecated. 
get file name that is not used right now

Parameters:
prefix - represents prefix of the name of file
suffix - represents suffix of the name of file
Returns:
file name that is not used right now

replaceImageUsingIText

public void replaceImageUsingIText(String pdfName,
                                   OutputStream os,
                                   Jbig2ForPdf imagesData)
                            throws PdfRecompressionException
Deprecated. 
replace images by they recompressed version according to JBIG2 standard positions and image data given in imagesData

Parameters:
pdfName - represents name of original PDF file
os - represents output stream for writing changed PDF file
imagesData - contains compressed images according to JBIG2 standard and informations about them
Throws:
PdfRecompressionException - if version of PDF is lower than 1.4 or was catch DocumentException or IOException


Copyright © 2012 Faculty of Informatics, Masaryk University, Brno. All Rights Reserved.