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

Handle exception javax.imageio.IIOException #1

Open
OmidNejadabbasi opened this issue Jun 7, 2021 · 4 comments
Open

Handle exception javax.imageio.IIOException #1

OmidNejadabbasi opened this issue Jun 7, 2021 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@OmidNejadabbasi
Copy link
Owner

When you try to convert big image files to pdf (checkout this test) IIOException occurs. It doesn't stop the app but prints the stack trace to the stdout.

@OmidNejadabbasi OmidNejadabbasi added enhancement New feature or request good first issue Good for newcomers labels Jun 7, 2021
@sudo-update
Copy link

sudo-update commented Jun 8, 2021

Hey, can I work on this?

@OmidNejadabbasi
Copy link
Owner Author

@sudo-update Of course, I will be glad to :)
Make sure you run the test to see the exception

@sudo-update
Copy link

I am able to replicate the issue and see the exception, but I am unable to find a solution. I'm sorry to take your time.

@OmidNejadabbasi
Copy link
Owner Author

I am able to replicate the issue and see the exception, but I am unable to find a solution. I'm sorry to take your time.

Actually, you could have just add another catch block above the IOException in JPEG2PdfCore file. and just ignore the catch. I myself also saw that this is a issue to the standard library of java. The ImageIO class that PDImageXObject class uses to get the dimensions of the input file.
And another thing, you don't need to apologize for this :)
I am glad if you learned something.
If you did, you can give this repo a star.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants