Hello,
We are currently using Aspose.Words.jar to convert MS Word documents into PDF on Mac platform, and we encountered for certain kinds of documents. It seems like the software has trouble to convert documents that are larger than 4MB or documents that have more than 200 pages.
We are using to following code to do the conversion:
=======
ByteArrayOutputStream dstStream = new ByteArrayOutputStream();
Document doc = new Document(path);
doc.save(dstStream, SaveFormat.PDF);
=======
Did we do something wrong? Is this a limitation of Aspose.Words.jar?
Thank you very much for your help.
Hi,
Hello Awais,
Thanks for your support.
I downloaded the latest 13.4.0 from the link you provided, but I have trouble to test it.
We have a license for the original jar file (not sure which version though). But the license we have doesn't seem to work with the latest 13.4.0 Aspose.Words.jdk16.jar (renamed to Aspose.Words.jar). The setLicense call throws an exception "Cannot find license 'Aspose.Total.Java.lic'". The license file is in the same folder as the jar file, and it works fine with the original jar file. Does it mean the license we got is tied to the version we got?
We ignore the exception, and go ahead to convert the problematic file we want to test. But then Aspose is running in evaluation mode without a valid license. It doesn't convert the whole document (519 pages), just the first 15 pages. The last page has a line "This document was truncated here because it was created using Aspose.Words in Evaluation Mode."
In summary, the original Words.jdk.jar doesn't generate any output for this problematic file. The lastest one converts the first 15 pages in evaluation mode. So we don't know if the latest one can hanlde the whole file or not.
Just in case you want to look at the problematic document, it is "CSharp Language Specification.doc, version 3.0" we download from the web.
Please advice the next step.
Thanks,
Yongjian
Hi Yongjian,
Thanks for your inquiry. Please post your license file via mail to us. We will investigate the issue on our end and provide you more information. In order to post your license file to us please follow the instructions provided in the following link:
https://forum.aspose.com/t/how-to-send-license-file-to-support-team/225542
Secondly, the content is missing because you’re using Aspose.Words in evaluation mode and your document is truncated at the end. Please note that there is an evaluation limitation of maximum number of paragraphs in the document. Please read the following article for more details:
Best regards,
Yongjian:
We have a license for the original jar file (not sure which version though). But the license we have doesn't seem to work with the latest 13.4.0 Aspose.Words.jdk16.jar (renamed to Aspose.Words.jar). The setLicense call throws an exception "Cannot find license 'Aspose.Total.Java.lic'". The license file is in the same folder as the jar file, and it works fine with the
Hello Awais,
Thanks for your information.
By using the explicity file path in setLicense, our license works with the latest Aspose.Words.jar.
And I have two questions about the aspose.slides.jar.
1) Does it support PPTX format? The latest jar throws an exception "UnsupportedFormatException: The file is ZIP archive. It can be Microsoft PowerPoint 2007 PPTX presention". What jar do we need to support PPTX format?
2) Does it support CJK fonts? We test a PPT file with Chinese characters, and only boxes show up in the resulted PDF file.
Thanks,
Yongjian
Hi Yongjian,
Hi Yongjian,
I have observed the both issues shared by you and like to share that you need to use PresentationEx class in order to access the PPTX presentations. Please visit this documentation link for your convenience.
For your second inquiry related to rendering of CJK fonts, I request you to please provide sample presentation, generated output and source fonts used. I will investigate the issue further on my end to help you out.
Many Thanks,
Hello,
Here is one of the document used to test the conversion.
This PPT was converted into a PDF using aspose.slides.jar, and all the Chinese characters show up as boxes in the resulted PDF, which is attached here as newPPT.pdf.
Thanks,
Yongjian
Hi Yongjian,
Presentation present = new Presentation(path2+“P020080410300148592135.ppt”);present.save(path2+“P020080410300148592135.pdf”, SaveFormat.Pdf);
Hello,
I downloaded aspose.slides.jar version 7.3.0, and made necessary changes to make it work (such as using com.aspose.slides.SaveFormat.Pdf instead of com.aspose.slides.export.SaveFormat.PDF...). The result is still the same. The output PDF contains only boxes.
I used a MacBook Pro running MacOSX 10.8.2, and jdk 1.6.0_37.
The resulted PDF is viewed on the MacBookPro using Adobe Reader 10.1.3 and also on Win 7 using Acrobat XI. It doesn't seem like missing language packages of the Acrobat/Reader, because inside the resulted PDF, the BaseFont being used is "FAAAAH+TimesNewRomanPS-BoldMT", which is not a Chinese font.
We have three questions:
1) Did you try to open the PDF file we attached before using Acrobat or Reader? Do you see the Chinese characters or boxes?
2) According to the font being written into the resulted PDF file, it seems like it is an issue generating the PDF. Does Aspose depend on certain version of JDK, with language packages?
3) Is it possible to send us a copy of the resulted PDF file you generated?
Thanks,
Yongjian
yongjian:
1) Did you try to open the PDF file we attached before using Acrobat or Reader? Do you see the Chinese characters or boxes?
I opened the PDF file shared by you and even the one generated on my end using Adobe Acrobat Reader 11. I have observed block codes in case of your PDF but observed no block codes for fonts in case of PDF generated on my end using Windows 7.
yongjian:
2) According to the font being written into the resulted PDF file, it seems like it is an issue generating the PDF. Does Aspose depend on certain version of JDK, with language packages?
The JDK version is not an issue. In my opinion the fonts used are missing on your end. For this, I suggest you to please try rendering to PDF in Windows environment as it worked on my end. If it works on your end as well then simply copy the fonts directory from Windows 7 inside Windows directory to Mac machine. Then use the following sample code in your application to load the fonts in Mac.
yongjian:
3) Is it possible to send us a copy of the resulted PDF file you generated?
According to the PDF you generated, Aspose is using a Chinese font called Simsun. This font is not found in the MacOSX /Library/Fonts folder. So I copy the simsunb.ttf file from a Windows 7 machine, and install it to the Mac machine. But problem is not fixed by this. Also tried to use the code mentioned in your reply to load the font folder. Doesn’t help either.
Now the original PPT file shows up properly using Preview and MS PowerPoint on the same Mac machine. Does it mean the font is supported by the system?
Thanks,
Yongjian
Hi Yongjian,
The issues you have found earlier (filed as WORDSJAVA-721) 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 SLIDESJAVA-33890) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.