remarks icon indicating copy to clipboard operation
remarks copied to clipboard

Annotations at wrong position

Open thamnos opened this issue 3 years ago • 1 comments

I believe this is happening with pdf files in landscape format. One test example is https://pressable.docraptor.com/wp-content/uploads/2012-12-10-landscape-format.pdf . The extracted annotations are positioned at the wrong location and are rotated. Depending on the pdf, I have seen 90 degree and 180 degree rotations.

thamnos avatar Mar 28 '21 19:03 thamnos

Hi @thamnos, thanks for reaching out.

I have never used (nor tested) remarks with any PDF in landscape. So this issue is due to omission :)

Are you willing to contribute a PR that addresses that? I would happily review and merge it to master.

From what I can tell right now, a solution would be to:

  1. First, modify utils.py to get the orientation from .content files, which seems to be either "orientation": "portrait" or "orientation": "landscape"

  2. And then handle orientation properly within parsing.py

Thanks

lucasrla avatar Apr 14 '21 14:04 lucasrla