How to convert images with following extensions jpg, pdf, gif, xls, xlsx, doc, docx, rtf, bmp, jpeg, csv to .TIFF in java?

StackOverflow https://stackoverflow.com/questions/11793711

  •  24-06-2021
  •  | 
  •  

Question

How to convert images with following extensions jpg, pdf, gif, xls, xlsx, doc, docx, rtf, bmp, jpeg, csv to .TIFF in Java ?

I want to convert all the above mentioned image extensions to .TIFF extension.

Was it helpful?

Solution

Apache Commons Sanselan has support for reading and writing BMP, JPEG/JFIF, TIFF, GIF and PNG from your list.

Apache PDFBox can convert PDF files to images (see PDFToImage code).

Apache POI can read doc, docx, xls and xlsx, but I am not aware of an easy way to convert them to an image (if that is what you would want to do). What you could probably do is make a conversion to a PDF first and then from PDF to an image.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top