Hi,
I am trying to convert a text file to PDF using Aspose.words,. I see the below exception and it is failing in conversion. Can you please assist?
Note:
Giving a direct file path for conversion works whereas giving inputstream fails.
Code:
Document doc = new Document(is); // "is" is inputstream
com.aspose.words.PageSetup ps1 = doc.getFirstSection().getPageSetup();
ps1.setLeftMargin(0.36 * 72); // 0.5 inch
ps1.setRightMargin(0.36 * 72);
doc.save("C:/temp/ImagetoPDF.pdf")
Exception:
java.lang.Exception: com.aspose.words.UnsupportedFileFormatException: Pdf format is not supported on this platform. Use .NET Standard or .NET 4.6.1 version of Aspose.Words for loading Pdf documents.
doc1.txt.zip (381 Bytes)