We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words exception with more than 6 pages

Hi Everybody,


When I convert a 6 pages RTF file to PDF every things is fine but … when I try to convert more than 7 page from a RTF file Aspose Rise an expection.

My java seams to be nice :

try {
logger.info("Convertion RTF to PDF avec fichier : " + path + fileName);
String ret = null;
License license = new License();
FileInputStream lic = new FileInputStream(new File(ConfigManager
.getInstance().getValue(“URL_LIC_ASPOSE”)));
license.setLicense(lic);
Document doc = new Document(path + fileName);
ret = fileName + “_aspose.pdf”;
doc.save(path + “/” + ret);
return ret;
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getLocalizedMessage());
return null;
}

The logs says : Unknow file format

Hope you guys can help me.

Best regards,

Lolo
Hi Lolo,
Kindly share the input RTF file.

Please find the RTF

Hi Lolo,

Thank you for the source file. I cannot reproduce the problem on my side. I used the latest version of Aspose.Words for testing. You can download the latest version from here:

http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/entry338929.aspx

With the latest version I can save your document into PDF format. So please try using the latest version of Aspose.Words for Java and if you can still observe the problem with the latest version, share details about your working environment.

Oooops,


I’ve the same version …

I’m actually working with maven 3. To insert Aspose’s libs into my repository I use only one jar , which is Aspose.Words.jdk16.jar. Is this correct according to you ?

By the way I’m working under Linux.

Hi

Thank you for additional information. Yes it is correct. You should use this jar. Could you please also provide a stack trace of the exception? We will check it and provide you more information.

Best regards,

Helloooooo,


I close the ticket.

Everythings is fine even if my old Aspose’s jar have the same version (in meta-inf).

Thanks a lot

Hello

It is perfect, that you already found the solution. If you need more assistance, we will be glad to help you.

Best regards,