Gettting the error SEVERE: Parameter name: pageCount when converting attached docx to tiff

Gettting the error

SEVERE: Parameter name: pageCount

when converting attached docx to tiff

Does not return the stream for second page.

Hello Anil,


We are sorry to hear that you have such issue. To be able to help you to resolve this issue we will need next:

1. Which version of the Confersion Java library you use?
2. Code example which throws this error, if possible example project which we can run and fix will be very useful

Best regards.

The issues you have found earlier (filed as CONVERSIONJAVA-96) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by GroupDocs Notifier.
(1)

Version 1.2.

I am just using what was given in the sample to convert a test document. Below is the code

package com.test;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

import com.groupdocs.conversion.config.IConfig;
import com.groupdocs.conversion.converter.options.ImageSaveOptions;
import com.groupdocs.conversion.handler.ConversionHandler;

public class TestConversion {

public static void main(String[] args) throws Exception {

File file = new File(“c:/temp/test.docx”);

InputStream in = new FileInputStream(file);
byte[] b = new byte[(int) file.length()];
in.read(b);
in.close();

List list = convertToTiff(“test.docx”, b);

for (int i = 0; i < list.size(); i++) {
FileOutputStream out = new FileOutputStream(“c:/temp/test” + i + “.tiff”);
out.write(list.get(i).toByteArray());
out.close();
}
}

public static List convertToTiff(String fileName,
byte[] fileContents) {
ConversionHandler conversionHandler = new ConversionHandler(
new IConfig() {
@Override
public String getStoragePath() {
return null;
}

@Override
public String getLicensePath() {
return “c:/temp/GroupDocs.Conversion.lic”;
}

@Override
public String getFileSavePath() {
return null;
}
});

ImageSaveOptions imageSaveOptions = new ImageSaveOptions();
imageSaveOptions.setSaveFileType(ImageSaveOptions.TIFF);

InputStream inStream = new ByteArrayInputStream(fileContents);
try {
ArrayList tiffStreamList = conversionHandler
.convertToImage(inStream, fileName, imageSaveOptions);

return tiffStreamList;
} catch (Exception ex) {
throw new RuntimeException(
“Error converting input document to tiff”, ex);
} finally {
try {
inStream.close();
} catch (IOException e) {
// so;
}
}
}

}

Hello,


Thank you for the code example. We will investigate it and then come back to you with the solution.

Thank you.
Hello ,

We have tested the scenario and have managed to reproduce the same issue at our side. We have logged this problem in our issue tracking system as CONVERSIONJAVA-96. We have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for the inconvenience.

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello Anil,

We have good news for you.

As you can see status of the issue was changed to Fixed. The issue was fixed and released in next GroupDocs.Conversion for Java version. We plan to release this version in the end of the month. When the version will be released you’ll get an email notification.

Thanks for your patience.

--------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+