galkahana / HummusJSSamples

Samples for HummusJS
Apache License 2.0
36 stars 61 forks source link

Segmentation fault: 11 when running text-extraction example on Chrome printed pdf #9

Open lizschwab opened 6 years ago

lizschwab commented 6 years ago

Hello,

I'm not sure if it's more appropriate to post this here or over in HummusJS, but I'm trying to use your sample library for text extraction. The project I'm working on will be using headless chrome to create pdfs, so I'm trying it against a pdf I manually saved from chrome. I've tried a couple of different pdfs with the same results. I get a Segmentation fault: 11 error when running the text-extraction/test.js

It works fine with the supplied pdf and with another pdf I created using PDF writer, so I think there's something unexpected about how Chrome is creating the pdf.

Attached is an example of a pdf I've had this error with. I got as far as finding it seems to be happening inside the translateText function in lib/text-extraction.js but I don't have a whole lot of time to look into it at the moment. Let me know if you need more info. HummusJS.pdf

chunyenHuang commented 6 years ago

Segmentation fault: 11 is usually caused by unresolved font file path.