katjas / PDFrenderer

Java library for rendering PDF documents to the screen using Java2D
Other
190 stars 94 forks source link

Ignore empty graphic state #84

Closed esimioni closed 2 years ago

esimioni commented 2 years ago

I have an application that produces PDFs with an empty Graphic State (/Resources<</ExtGState<<>>). Without the change in this commit PDFrenderer creates a blank image and logs a NPE in background, with the change it creates the desired result. I'm no PDF expert, but all mainstream PDF readers were able to open the files correctly with the empty Graphic State.