Class ReplaceImage
- java.lang.Object
-
- edu.upf.taln.dri.common.connector.pdfx.ReplaceImage
-
public class ReplaceImage extends Object
Utility class to replace images in PDF files in order to decrease the final size of the same file.
-
-
Constructor Summary
Constructors Constructor Description ReplaceImage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
static com.itextpdf.text.Image
makeBlackAndWhitePng(com.itextpdf.text.pdf.parser.PdfImageObject image)
void
manipulatePdf(String src, String dest)
static void
replaceStream(com.itextpdf.text.pdf.PRStream orig, com.itextpdf.text.pdf.PdfStream stream)
-
-
-
Field Detail
-
filename
public static final String filename
- See Also:
- Constant Field Values
-
SRC
public static final String SRC
- See Also:
- Constant Field Values
-
DEST
public static final String DEST
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(String[] args) throws com.itextpdf.text.DocumentException, IOException
- Throws:
com.itextpdf.text.DocumentException
IOException
-
manipulatePdf
public void manipulatePdf(String src, String dest) throws com.itextpdf.text.DocumentException, IOException
- Throws:
com.itextpdf.text.DocumentException
IOException
-
makeBlackAndWhitePng
public static com.itextpdf.text.Image makeBlackAndWhitePng(com.itextpdf.text.pdf.parser.PdfImageObject image) throws IOException, com.itextpdf.text.DocumentException
- Throws:
IOException
com.itextpdf.text.DocumentException
-
replaceStream
public static void replaceStream(com.itextpdf.text.pdf.PRStream orig, com.itextpdf.text.pdf.PdfStream stream) throws IOException
- Throws:
IOException
-
-