JDeli is able to convert a GIF image into a PDF file.
JDeli can do this in ONE step with the convert method. You can also do this by reading a GIF image and then writing out the image as PDF, which is useful if you want to process the image in some way.
Single step method to convert from GIF into PDF file
JDeli.convert(File inFile, File outFile);
JDeli.convert(InputStream inFile, OutputStream outfile, String format);
byte[] outputData = JDeli.convert(byte[] inputData, String format);
Depending on the image formats being converted (ie set compression level in Tiff files), JDeli also provides overloaded methods. These can be used to supply conversion options for more control over the conversion process.
Read / Write methods for converting from GIF into PDF file
1. Read GIF image into Java
BufferedImage image = JDeli.read(imageFile);
or
GifDecoder decoder = new GifDecoder();
BufferedImage image = decoder.read(imageData);
2. Process image
3. Write out Java image as PDF
File myFile = new File("file.pdf"); JDeli.write(image, "pdf", myFile);
or:
PdfEncoder encoder = new PdfEncoder();
encoder.write(image, outputStream);