anaralabs / anaralabs/lector

The page component create a div with wrong dimension when the PDF has rotation

Đang mở
#81 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
395
Fork
39
Merge trung bình
7 giờ 7 phút
Pull request đã merge (30 ngày)
12

Mô tả

When using lector with a PDF that has rotation (i.e., 270°), the content is displayed correctly thanks to your generateViewports function that take into account the PDF rotation.

But the page component use raw width/height parameter instead of using the width/height from the calculated viewport. This lead to wrong div dimension (ui issue) and possible wrong layer positioning.

As consequence, when using your jumpToHighlightRects function, the layer is not placed correctly.

To address this issue I have create this pull request : #77

As example here the screenshot of the viewer with a PDF without rotation (landscape layout)

Image

And the same pdf that has been rotated to be in portrait layout:

Image

The PDF is always displayed properly (look at the purple border), but the page component use inverted dimensions.

Thanks

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.