Free Support Forum -

Working fine in Windows machine but failing in Unix machine


I need to convert a doc to pdf. Its working fine in windows because the file paths are as follows :

Document doc = new Document("C:/AsposeTest/aug/Test result_HtmlTags.doc");"C:/AsposeTest/aug/output.pdf", com.aspose.words.SaveFormat.PDF);

But when i am running this in Unix machine the its not able to convert it to pdf where the

file path is coming as "/usr/local/Test.doc" .

Even I tried as below :

Document doc = new Document("C:\\AsposeTest\\aug\\Test result_HtmlTags.doc");


Hello Sriman,

Thanks for using our products.

I have tested the scenario using Aspose.Pdf for Java 2.9.0 over Red Hat Enterprise Linux 5 (64Bit) with JRE 1.6.0_21-rev-b10 and I am unable to notice any problem. The PDF document is properly being generated.

I have also tried converting the same XML file into PDF over Windows 7 Professional (64Bit) where my JDK version is 1.6.0_20 and Aspose.Pdf for Java is 2.9.0 and I am also unable to notice any issue. Can you please share the sample XML file causing issue so that we can test the scenario at our end. We apologize for your inconvenience.


Pdf pdf = new Pdf();
pdf.bindXML("SampleXML.xml", null);"result.pdf");
System.out.println("Aspose PDF is saved successfully");

Hello Sriman,

The initial intimation that I have received was regarding problem in PDF generation using BindXML(...) method of Aspose.Pdf for Java. Now that I can see the problem description is updated for Word to PDF conversion, so it seems to be related to Aspose.Words for Java.

For your convenience, I am moving this thread to Aspose.Words forum where I believe my fellow workers taking care of this product would be in better position to answer this query. We apologize for this inconvenience.

Hello Sriman,

Thanks for your request. I'm a representative for Aspose.Words. Using Aspose.Words you can convert any Word documents to PDF. Please see the following link to learn more:

Could you please attach the document you are getting problem with? I will check it on my side and provide you more information.

Please let me know in case of any issue. I will be glad to help you.

Best regards,

Hi, Its not specific to any document.

If the file path is as follows its throwing the exception. However Its working fine in windows machine where that path is "C:/etc/etc/test.doc"

I tried with aspose word 4.0.3 and 10.0 (by downloading from

Document doc = new Document("/usr/AsposeTest/aug/Test result_HtmlTags.doc");"/usr/AsposeTest/aug/output.pdf", com.aspose.words.SaveFormat.PDF);

I am using Aspose java 2.7.0


Thanks for your request. When you render documents to PDF, XPS or convert to EPUB that requires embedding of fonts into a document, then Aspose.Words needs to have access to TrueType fonts. If you run Aspose.Words on a Windows system, then by default it will search for fonts in the system Windows\Fonts folder. But if you run Aspose.Words on a Linux system, it does not have a default location for fonts and you need to specify it explicitly.

Use the new com.aspose.words.FontSettings class and setFontsFolder/setFontsFolders methods to specify the location of TrueType fonts.


DocumentBuilder b = new DocumentBuilder();

b.getFont().setName("Water on the Oil");


b.writeln("Hello World!");

b.getDocument().save("TestHelloWorld Out.pdf");

Best regards,

Hi I am getting the following exception :

ERROR FileAttachmentHelper: Exception while converting the file :/local/temp/1105-2578166_1309270046087/AllDocsType/1.doc into Pdf
java.lang.IllegalStateException: Cannot find any fonts installed on the system.
at asposewobfuscated.pq.a(
at asposewobfuscated.pq.a(
at com.aspose.words.n.a(
at com.aspose.words.aqx.a(
at com.aspose.words.fp.ak(
at com.aspose.words.fp.BL(
at com.aspose.words.fp.moveNext(
at com.aspose.words.fp.Bh(
at com.aspose.words.Document.updatePageLayout(
at com.aspose.words.Document.ab(
at com.aspose.words.Document.zY(
at com.aspose.words.Document.getPageCount(
at com.aspose.words.pj.a(
at com.aspose.words.Document.a(
at com.aspose.words.Document.a(
at com.aspose.words.Document.f(


Thanks for your request. FontsFolder should contain fonts, which are using in your document. At least this folder should contain one valid TrueType font. Please try creating folder, put there few valid MS TrueType fonts (Arial and Times New Roman, for example) and specify this folder as FontsFolder. Also, please make sure that you application can read fonts from this folder.

Best regards,