cz.muni.pdfjbim
Class PdfImageReplacer

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

public class PdfImageReplacer
extends Object

class for replacing images inside PDF document by their recompressed version

Author:
Radim Hatlapatka (208155@mail.muni.cz)

Constructor Summary
PdfImageReplacer()
           
 
Method Summary
 void replaceImageUsingIText(InputStream originalPdf, OutputStream os, Jbig2ForPdf imagesData)
          replace images by they recompressed version according to JBIG2 standard positions and image data given in imagesData
 void replaceImageUsingIText(String pdfName, OutputStream os, Jbig2ForPdf imagesData)
          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

PdfImageReplacer

public PdfImageReplacer()
Method Detail

replaceImageUsingIText

public void replaceImageUsingIText(String pdfName,
                                   OutputStream os,
                                   Jbig2ForPdf imagesData)
                            throws PdfRecompressionException
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

replaceImageUsingIText

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

Parameters:
originalPdf - 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.