-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Throw errors instead of os.Exit of invalid fonts #833
Comments
This is intentional! |
@hhrutter I got Why is this behaviour of throwing an |
Show me your stack trace. |
Bottomline: You have to ensure you have all user fonts installed that you will need for your operation. I need more info about what you are doing in oder to analyze this. |
Even if the API is used in an incompatible way, using |
This is a judgement call and pdfcpu is still Alpha. |
@hhrutter There wasn't any other error before the |
I need to see what you are doing in order to follow up. |
@hhrutter I'm using the pdfcpu api's fill function on pdfs which are fetched from s3. I got the above os.Exit message when trying to perform fill action on a pdf. Following is my model configuration
Also before filling, I'm performing the optimise action on the pdfs as well. |
There should have been a check if the font in question is installed as one of your pdfcpu user fonts prior to os.exiting. |
@hhrutter Are you talking about checks in pdfcpu or checks that I should implement. I've verified the error log and post downloading the file from s3 the only log that I can see is |
Please go get the latest commit and report back any issues. |
@hhrutter Verified that this is now fixed |
I faced an
os.Exit
when pdfcpu tried to perform pdf operation on a pdf with invalid font with the following log.pdfcpu: user font not loaded: Arial
.I looked in the code an found the following line where we are doing an os.Exit instead of returning an error.
The text was updated successfully, but these errors were encountered: