Skip to content

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