New issue
Advanced search Search tips

Issue 707447 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

PDF viewer should zoom direction neutrally (LTR vs RTL)

Project Member Reported by thestig@chromium.org, Mar 31 2017

Issue description

Refiling https://bugs.chromium.org/p/pdfium/issues/detail?id=563

What steps will reproduce the problem?
1. Open these two:
http://faculty.mu.edu.sa/public/uploads/1392719203.5064jazaria.pdf
and
https://partners.adobe.com/public/developer/en/xml/AdobeXMLFormsSamples.pdf
2. Zoom in on them using Ctrl+Scroll or Ctrl++

What is the expected output? What do you see instead?
When I zoom in on a PDF with RTL text on it, I expect the portion I am zooming in would be on right but pdf viewer is doing same zooming on both RTL and LTR document, just like what actually happens on sites with RTL direction.

If understanding the above message is a bit hard, just assume all what I need is to see is to Expected image (scroll bar on middle of page) be the result of zooming in on a PDF page. I remember this is what PDF viewer of Edge is doing so pdfium could do so also I'd guess.

 
Cc: mcnee@chromium.org wjmaclean@chromium.org
I haven't looked very hard to see if this is pdf/ code or something higher up that's causing the positioning to lean left. It's especially noticible when going up to 500% zoom.

Comment 3 by mcnee@chromium.org, Apr 6 2017

In viewport.js, setZoomInternal_ and updateZoomFromBrowserChange update the scroll position, which is the top left, based on the new zoom. So, one option would be to scale the top right position if we're in RTL.

Comment 4 by ebra...@gnu.org, May 9 2017

I guess detecting direction would be hard or impossible on pdf documents as I never seen that on a pdfviewer, please just do that just like what Microsft Edge pdf view is doing, direction neutral zoom and going into center with Ctrl++.

Comment 5 by ebra...@gnu.org, May 9 2017

I also prefer that on English documents also as I usually use Ctrl++ for zooming in a page to remove its blank padding and not to a specific place on its left or right and I guess that is a common use for it as Edge also doing, zooming to a specific place should be done with  Issue 575670  anyway.

Comment 6 by npm@chromium.org, May 9 2017

The PDF zoom seems to be doing the same as the browser zoom. Do you think zooming in any website should also have the centered behavior, or is there any reason PDF's are special?

Comment 7 by ebra...@gnu.org, May 9 2017

I do believe PDF are special as they usually represent real world documents that for physical reasons like printing limitations and considering place for bookbinding have blank margins, but even without considering that, whether websites do center zooming or not, they usually have first some auto aligning mechanism on browsers, for example a Wikipedia page, https://en.wikipedia.org/wiki/Dr._Jekyll_and_Mr._Hyde_(1887_play) that if you zoom into the page, the inside text will be aligned somewhat correctly that users won't usually feels the difference. Of course while I was a macOS user, I didn't use Ctrl++ even anyway as I was using pinch to zoom to fit the page best to my screen but for users without having access to touchpad device like, I think the best behavior would be center zooming.

Comment 8 by ebra...@gnu.org, May 9 2017

Of course I think center zooming should be limited to PDFs as I checked Edge just right now and is there also and web page zooming is much more relied behavior by users than PDFs.
Owner: hnakashima@chromium.org
Status: Assigned (was: Untriaged)
hnakashima@ to triage for PE.
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment