jrmuizel / pdf-extract

A rust library for extracting content from pdfs
396 stars 78 forks source link

Panic on the SC command when using Pattern colorspace #39

Closed badicsalex closed 2 years ago

badicsalex commented 2 years ago

Hi,

I have a minimal reproducing document of a panic: https://stickman.hu/junk/pdf_extract_repro_1.pdf The panic in the as_num function, because "/P0" was not a number.

This is caused by what I assume a copy-paste mistake in the handler at https://github.com/jrmuizel/pdf-extract/blob/master/src/lib.rs#L1413, where instead of fill_colorspace, stroke_colorspace should be used.