Closed prscoelho closed 7 months ago
Do you have some reference for the choice of 1.0 as the default? Can you link to an example PDF that shows this problem?
I have no reference for the value of 1.0 as default, it was just that the alternative was unwrapping a None value. It's entirely possible that the problem should be solved somewhere else in the code.
This pdf that I have is private, and it also relies on https://github.com/jrmuizel/pdf-extract/pull/82 (decrypting with empty password)
But I will see if I can edit this to remove the encryption and remove some private information. Is there some place I can send you this pdf privately?
You can send it to jrmuizel@gmail.com
I sent you the pdf. Upon closer look I think this character is just broken :( Some(1.0) avoids a panic, but it's likely not the correct value..
I pushed 73313393a194faebc4a9bf025dd4e9063db9ea04 which should fix this.
It does indeed. Thank you!
default_width is never changed from its initial value of None, so for pdfs that end up unwrapping this value, it always results in a panic. Therefore, assume a default_width of Some(1.0)
This change yields correct results for my pdf that was previously panicking.