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

Fix issue #64: uncovertible images #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eitanf
Copy link

@eitanf eitanf commented Nov 29, 2017

When iText.text.pdf.parser fails to parse/convert an image, CERMINE
fails to catch the exception and crashes. This patch catches the
exception, reports it, and skips the page with the unconvertible image
(continue to parse the rest of the pages).

See issue #64: #64

Eitan Frachtenberg added 2 commits November 29, 2017 10:29
When iText.text.pdf.parser fails to parse/convert an image, CERMINE
fails to catch the exception and crashes. This patch catches the
exception, reports it, and skips the page with the unconvertible image
(continue to parse the rest of the pages).

See issue CeON#64: CeON#64
Catch the following exception and skip parsing the page:
Exception in thread "main" java.lang.IllegalArgumentException: Unexpected color space /CS1
	at com.itextpdf.text.pdf.parser.InlineImageUtils.getComponentsPerPixel(InlineImageUtils.java:250)
	at com.itextpdf.text.pdf.parser.InlineImageUtils.computeBytesPerRow(InlineImageUtils.java:263)
	at com.itextpdf.text.pdf.parser.InlineImageUtils.parseUnfilteredSamples(InlineImageUtils.java:292)
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

Successfully merging this pull request may close these issues.

1 participant