Problems with mathematical formulas converting doc to pdf

Hi, I’m converting from a Word file to PDF, the Word file containing mathematical formulas, but after converting to PDF, these formulas do not appear in the new pdf file.

I Updated to version Aspose.words(1.6) 13.7.0.0 but the problem continues.
I attached the files.

My code is very basic:

com.aspose.words.Document document = new com.aspose.words.Document("c:/INS-GPR-CAL-017.doc");
FontSettings.setFontsFolder(this.getFontsPath(), true);
document.save("c:/INS-GPR-CAL-017.pdf");

In addition, that formulas were created by microsoft equation editor 3.0, Is this compatible with aspose words?

Best Regards.
Martin Fernandez

Hi Martin,

Thanks for your inquiry. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-8815 in our issue tracking system. I 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 your inconvenience.

Thank you Tahir for you response.

I’m waiting to hear from you.

Best Regards
Martin Fernandez

Hi Martin,

Sure, we will update you via this forum thread once this issue is resolved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

The issues you have found earlier (filed as WORDSNET-8815) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Thank you very much!!, I will do tests and tell them the results

Best Regards
Martin Fernandez

Hi all,
thank you very much for reporting the news of the new version, I upgraded to version 13.9.0.0 and when I convert the attachment “wordSource.doc” to pdf, or when I convert the same word file to image, the conversion is bad.

The file mentioned “wordSource.doc” contains a formula made ​​with “Microsoft Equation Editor 3.0” and, I think it is the reason for the bad conversion.

Your issue is WORDSNET-8815.

I attached the files.
Best Regards
Martin Fernandez
Java Developer

Hi Martin,

Thanks for your patience.

*javicorvi:

when I convert the attachment “wordSource.doc” to pdf,*

Unfortunately, Doc to Pdf conversion issue has not resolved yet. I have tested the scenario while using latest version of Aspose.Word (v 13.9.0) and have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-9072 in our issue tracking system. I 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 your inconvenience.

*javicorvi:

… or when I convert the same word file to image, the conversion is bad.*

In your case, I suggest you please increase the resolution of output image file by using ImageSaveOptions.setResolution method as shown in following code snippet. Hope this helps you.

Document doc = new Document(MyDir + "wordSource.doc");
ImageSaveOptions option = new ImageSaveOptions(SaveFormat.TIFF);
option.setResolution(300);
doc.save(MyDir + "Out.tif", option);

It would be great if you please share following detail for investigation purposes.
What environment are you running on?

  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • Java version
  • Please supply us with the code from your application that is causing the issue

Hi Martin,

Further to my last post, I have noticed that the bullets at first page of Doc file do not render correctly. I have logged this issue as WORDSNET-9074 in our issue tracking system. I 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 your inconvenience.

Hi Tahir,
thanks for your responses, I added setResolucion(300) code line, with tiff format appears the following error:“java.lang.IllegalArgumentException: Parameter name: pageCount”, but when I change to jpeg format, the resolution of the image is better but the mathematical formula is still bad (see page1.jpeg).

My code is:

com.aspose.words.Document document = new com.aspose.words.Document(absolutePath);
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.JPEG);
for (int pageIndex = 0; pageIndex < document.getPageCount(); pageIndex++)
{
    String outputFileName = String.format(workDirUrl + "page" + pageIndex + ".jpeg", pageIndex + 1);
    options.setPageIndex(pageIndex);
    document.save(outputFileName, options);
}
// the absolutePath variable contains the doc file path.
// the workDirUrl variable is the target path

This code working properly for all doc files, but not in this case with the mathematical formula mentioned.

Environment:
windows 7 / 64 bits

Best Regards
Martin Fernandez

I forgot the Java version, I used Java 6

Martin

Hi Martin,

Thanks for your inquiry.

*javicorvi:

… with tiff format appears the following error:“java.lang.IllegalArgumentException: Parameter name: pageCount”,*

Please include the following highlighted line of code in your application. ImageSaveOptions.setPageCount method sets the number of pages to render when saving to a multipage TIFF file.
ImageSaveOptions.setPageCount will solve the exception issue.

Document doc = new Document(MyDir + "wordSource.doc");
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.TIFF);
for (int pageIndex = 0; pageIndex < doc.getPageCount(); pageIndex++)
{
    String outputFileName = String.format(MyDir + "page" + pageIndex + ".tiff", pageIndex + 1);
    options.setPageIndex(pageIndex);
    options.setPageCount(1);
    doc.save(outputFileName, options);
}

*javicorvi:

but when I change to jpeg format, the resolution of the image is better but the mathematical formula is still bad (see page1.jpeg).*

I have managed to reproduce the same issue at my side. I have logged this issue as WORDSJAVA-796 in our issue tracking system. I 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 your inconvenience.

Hi Tahir,
thank you a lot for your response, I’m waiting for any news.

Best Regards
Martin Fernandez

Hi Martin,

Thanks for your
inquiry. I would like to share with you that issues are addressed and
resolved based on first come first serve basis. Currently,
your issue (WORDSJAVA-796) is pending for analysis and is in the queue. I am afraid, I
cannot provide you any reliable estimate at the moment. Once your issue
is analyzed, we will then be able to provide you an estimate.

Thank you for your patience and understanding.

Hi Tahir,
I’m waiting for any news, thank you a lot for your help.

Best Regards.
Martin Fernandez

Hi Martin,

Thanks for your inquiry. I have verified the status of WORDSJAVA-796
from our issue tracking system and like to share with you that this
issue has been planned for development. Hopefully, the fix of this issue
will
be available in November 2013 release. Please note that this
estimate is not final at the moment; I will be sure to inform you via
this forum thread as soon as your issue is resolved.

Thank you for your patience.

The issues you have found earlier (filed as WORDSNET-9072;WORDSNET-9074) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSJAVA-796) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi Tahir, I updated to the version 13.12 of Aspose Words and the problem is solved.

Thanks a lot.
Martin Fernandez
Senior Java Developer

Hi Martin,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.