Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert PCL to PDF error #43

Open
npodbutsky opened this issue Dec 4, 2019 · 4 comments
Open

Convert PCL to PDF error #43

npodbutsky opened this issue Dec 4, 2019 · 4 comments

Comments

@npodbutsky
Copy link

Hello.
I've faced a problem with com.aspose.pdf.examples.AsposePdfExamples.DocumentConversion.ConvertPCLToPDFFormat class. The thing is, it fails with NullPointerException on line 12 :
Exception in thread "main" java.lang.NullPointerException at com.aspose.pdf.internal.pcl.util.BaseFontHelper.lI(Unknown Source) at com.aspose.pdf.internal.pcl.util.BaseFontHelper.lI(Unknown Source) at com.aspose.pdf.internal.l94n.lI.<init>(Unknown Source) at com.aspose.pdf.internal.l94n.lt.<init>(Unknown Source) at com.aspose.pdf.internal.pcl.composer.lI.lu(Unknown Source) at com.aspose.pdf.internal.pcl.composer.lI.<init>(Unknown Source) at com.aspose.pdf.l12j.lI(Unknown Source) at com.aspose.pdf.l12j.lI(Unknown Source) at com.aspose.pdf.ADocument.lI(Unknown Source) at com.aspose.pdf.ADocument.<init>(Unknown Source) at com.aspose.pdf.Document.<init>(Unknown Source) at com.aspose.pdf.examples.AsposePdfExamples.DocumentConversion.ConvertPCLToPDFFormat.main(ConvertPCLToPDFFormat.java:12) .
The only thing I changed was the filename in Document constructor (I changed "Document.pcl" to "src/main/resources/com/aspose/pdf/examples/AsposePdf/Conversion/pcltopdf/test.pcl" so that the constructor can find the source).

Is there a problem with the "test.pcl" file or something else?
Thank you in advance.

@farhan-raza
Copy link
Member

@npodbutsky

We are unable to reproduce the issue as the PDF file is generated fine. We have attached generated file for your kind reference. test1-converted.pdf

PS: I work with Aspose as Developer Evangelist.

@kashifiqb
Copy link
Contributor

@npodbutsky,

Were you able to resolve the issue? Let us know if we could of any help to you.

@npodbutsky
Copy link
Author

Hello @kashifiqb

Sorry for not reporting status for a long time. My colleagues and I found that the performance of the converter somehow depends on the environment. Namely, the error occurs on MacOS Catalina and Ubuntu 18.0.4/19.0.4. On Windows and MacOS of earlier versions the converter works fine.
Unfortunately, we didn't manage to determine the cause of the error more precisely, so we decided to leave it for now.

I would be grateful if you could test the example in question on any of the systems mentioned above. Maybe that would give some insight on the cause.

@asadalikhan90
Copy link
Collaborator

@npodbutsky

The issue can also cause due to the absence of MS Fonts in the macOS. Please try to install MS Fonts and libgdiplus package in the macOS and check again. In case of any issues, please feel free to create a topic in our official support forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants