pdf-rs / pdf_render

MIT License
104 stars 21 forks source link

Char space and word space in case of the space character #12

Closed badicsalex closed 1 year ago

badicsalex commented 1 year ago

The following code has a tiny misalignment:

https://github.com/pdf-rs/pdf_render/blob/406ccc0517bb13508d17282962fe47072ecd2f96/render/src/textstate.rs#L139

In case of space, both word and char spacing should be added.

This issue is very simialr to https://github.com/jrmuizel/pdf-extract/issues/35, which was fixed in https://github.com/jrmuizel/pdf-extract/commit/271b616291fa539272a17e503e3f2937340341be

s3bk commented 1 year ago

Thanks. I did not verify it, so I hope it is correct. If not we will see..