Closed bwinter closed 8 years ago
i got the same error `glyph_width': Unknown glyph width for 160 Helvetica (ArgumentError). Can you please fix this as soon as possible.. Thanks in advance
kalpesh
Temporary Work Around Substitute the following code in the "built_in.rb" file You can then run successfully without the glyph width error Please note the # line was the original code.
def glyph_width(code_point) return 1000 if code_point = 160 || code_point < 0
Awesome, thanks.
Was a better solution for this found? This stops the error but it misses a lot of characters when parsing the PDF. "Noble" becomes "ble", for example.
@aarmora I adjusted the glyph_width workaround to be 100 code_point
instead of 1000 and it seems all my text was preserved :)
return 100 if code_point = 160 || code_point < 0
Thanks for reporting this, and apologies for the disappointingly slow response. I believe the issue has been fixed in todays 1.4.0
release
Thanks for taking care of this!
I think I am having the same issue as these people: https://github.com/yob/pdf-reader/issues/117 https://github.com/yob/pdf-reader/issues/102 (I was having problems appending my issue so am creating this new one.)
Stack Trace:
Example Code:
Thanks in advance, Brendan