Free Support Forum -

TIFF to pdf conversion issue in Java

I am using GroupDocs conversion trail version (17.3.0) as part of POC and trying to convert some files.

facing below 2 issues.

java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner( [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
at [main/:na]
Caused by: TiffImageException: Failed to decode the image strip 0. Details: Cannot read 25235234 bytes from stream.
at$a.process(Unknown Source) ~[groupdocs-conversion-17.3.0.jar:1.0_01]

java.lang.OutOfMemoryError: Java heap space
at com.groupdocs.conversion.internal.c.a.i.ak.a(Unknown Source) ~[groupdocs-conversion-17.3.0.jar:1.0_01]


Thanks for sharing the exception details. You are required to share problematic files (source files you tried to convert) and sample project as well. So that we can investigate this issue and help you out ASAP.

public void run(String… args) throws Exception {

Utilities listFilesUtil = new Utilities();
final String tiffdirectory = "./Data/tiffs";

File directory = new File(tiffdirectory);
//get all the files from a directory
File[] fList = directory.listFiles();
for (File file : fList) {
    if (file.isFile()) {


public static void convertToPdfAsFilePath(String fileName) {
// Instantiating the conversion handler

    ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
    PdfSaveOptions saveOption = new PdfSaveOptions();

    // Set absolute path to file
    String guid = fileName;
    String convertedDocumentPath = conversionHandler.<String> convert(guid, saveOption);
    //System.out.print("Converted file path is: " + convertedDocumentPath);


build.gradle dependencies
dependencies {
testCompile group: ‘junit’, name: ‘junit’, version: ‘4.12’
compile ‘com.groupdocs:groupdocs-conversion:17.3.0’


Can you please share all of the problematic files that are in your tiffs folder? We’ll further investigate the issue using those files.

It seems there are number of large files you are trying to convert. Once you share all those problematic files, we shall investigate the issue and share a workaround with you.

I am not suing not trying to convert large file. Its small file around 34 KB tif file. I am not sure how attach a file here.


Please follow the instructions given in the screenshot in order to upload a file.
How to attach a file.PNG (10.4 KB) (610.2 KB)

Hi Athir,

I have attached 3 tif files I am trying to test with.

The problem was I am not able to see icons in IE browser while replying to topic. Chrome is working.


this is the error i am getting
Caused by: TiffImageException: Failed to decode the image strip 0. Details: Cannot read 32154854 bytes from stream.


Thanks for sharing the problematic files. We are investigating your issue and we’ll let you know about the outcomes. Your patience will be appreciated.

Hi I do not have access to

Even though I created account, I do not have access to above forum topic.



Kindly omit the email notification you got from forum about this query. You got this notification by mistake.

do you have any info for me on this topic.



We haven’t heard a response back (on this issue) from the concerned team yet. Your logged issue ID is CONVERSIONJAVA-425. However, we’ve asked them ETA for the fix. As we get any update from them, you’ll be notified


We are please to inform you that your reported issue is resolved in 17.7 version of the API. You can download this version of the API here. If you face any further issue, share that with us.