Hi,
Thanks for solution.
I have executed the same code in eclipse, but unfortunately I am getting the below error:-
Exception in thread "main" sun.misc.ServiceConfigurationError: java.nio.charset.spi.CharsetProvider: Provider com.aspose.ms.java.utf7charset.provider.CharsetProvider not found
at sun.misc.Service.fail(Unknown Source)
at sun.misc.Service.access$000(Unknown Source)
at sun.misc.Service$LazyIterator.next(Unknown Source)
at java.nio.charset.Charset$1.getNext(Unknown Source)
at java.nio.charset.Charset$1.hasNext(Unknown Source)
at java.nio.charset.Charset$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.nio.charset.Charset.lookupViaProviders(Unknown Source)
at java.nio.charset.Charset.lookup2(Unknown Source)
at java.nio.charset.Charset.lookup(Unknown Source)
at java.nio.charset.Charset.forName(Unknown Source)
at asposewobfuscated.sd.pL(Encoding.java:503)
at asposewobfuscated.sd.pI(Encoding.java:469)
at asposewobfuscated.sd.a(Encoding.java:453)
at asposewobfuscated.sd.m(Encoding.java:393)
at com.aspose.words.ox.a(FileFormatDetector.java:318)
at com.aspose.words.ox.aN(FileFormatDetector.java:304)
at com.aspose.words.ox.A(FileFormatDetector.java:44)
at com.aspose.words.Document.b(Document.java:1111)
at com.aspose.words.Document.a(Document.java:1087)
at com.aspose.words.Document.(Document.java:194)
at com.aspose.words.Document.(Document.java:165)
at com.aspose.words.Document.(Document.java:160)
at TextByteToPDF.main(TextByteToPDF.java:25)
I am using "Aspose.Words.jdk15.jar" version number 10.1.0.0.
Then I have downloaded jar file with version 11.0.0.0. I got below error after run the same code:-
com.aspose.words.UnsupportedFileFormatException: Unknown file format.
at com.aspose.words.Document.b(Document.java:1286)
at com.aspose.words.Document.a(Document.java:1167)
at com.aspose.words.Document.(Document.java:200)
at com.aspose.words.Document.(Document.java:171)
at com.aspose.words.Document.(Document.java:166)
at TextByteToPDF.main(TextByteToPDF.java:25)
So, could you please privide any solution. And also tell me any possibilities working same thing in 10.1.0.0 version because in production we are using same version of jar file.
Please find the attached code and text file for your reference.
Regards,
RSY Narayan