mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.96k stars 9.92k forks source link

page-fit doesn't work correctly #7541

Open Djfe opened 8 years ago

Djfe commented 8 years ago

Configuration: Firefox 48.0 64bit Win 10 64bit education included one

Steps to reproduce the problem: Open PDF with one Din A4 page

What is the expected behavior? (add screenshot) Since I selected page-fit, ist should fit the page, but it doesn't because of the margin/border and shadow the calculated width/height of the canvas/page doesn't fit it. There is a vertical scrollbar Try to subtract border shadow/margins etc. before doing the height/width maths That should fix it.

Regards, Djfe

timvandermeij commented 8 years ago

As indicated in https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md, please share (a link to) an example PDF file that shows the issue.

Djfe commented 8 years ago

You just need a PDF with one DIN A4 page in it, like this one: example pdf And switch to page-fit mode (I already included the necessary parameter for you in the link)

Regards, Djfe

Djfe commented 8 years ago

Are you able to reproduce the issue? Just in-case, this is what I'm seeing: screenshot

^This y-scrollbar shouldn't be there if you select page-fit

timvandermeij commented 8 years ago

Thank you. I can indeed reproduce the issue. Marking this as a viewer issue.