Class PdfEncoder

java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.pdf.PdfEncoder
All Implemented Interfaces:
com.idrsolutions.image.Encoder

public class PdfEncoder extends com.idrsolutions.image.JDeliImage implements com.idrsolutions.image.Encoder
Class generates a PDF from a BufferedImage or Image file
If the image is a multi-page TIFF then this class generates a multi-page PDF file

Example 1 (writing from a BufferedImage):


 File pdfFile = new File("C:\\path\\to\\output\\file.pdf");
 pdfFile.createNewFile();
 PdfEncoder encoder = new PdfEncoder();
 encoder.write(bufferedImage, pdfFile);
 

Example 2 (writing from a File):


 File pdfFile = new File("C:\\path\\to\\output\\file.pdf");
 pdfFile.createNewFile();
 PdfEncoder encoder = new PdfEncoder();
 encoder.write(new File("C:\\path\\to\\input\\image.PNG"), pdfFile); //can be BMP, JPEG, TIFF or any supported Image