Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase zoom range #84

Open
ghost opened this issue Feb 22, 2021 · 17 comments · May be fixed by #100
Open

Increase zoom range #84

ghost opened this issue Feb 22, 2021 · 17 comments · May be fixed by #100

Comments

@ghost
Copy link

ghost commented Feb 22, 2021

Many common PDFs (with small page formats?) cannot be sufficiently enlarged to fit the screen, let alone zoomed into. An increase of the zoom range by a factor of 2, better 4, should fix this.

@thestinger
Copy link
Member

We can support zooming out further but it's unrealistic to support zooming in further due to how much memory is used by HiDPI rendering.

@ghost
Copy link
Author

ghost commented Feb 22, 2021

I see, that is unfortunate. Perhaps an increase by a factor of 1.5 could still be implemented, given that the latest Pixels all have at least 6 GB of RAM. That would already help a lot.

Alternatively, a toggle could be added that increases the zoom range at the expense of available memory.

@MHShetty
Copy link
Member

MHShetty commented Aug 8, 2021

Do you want the PDF viewer's content to fit width by default?

MHShetty added a commit to MHShetty/PdfViewer that referenced this issue Aug 9, 2021
…ge" GrapheneOS#84 (main repository) and adds background color and slight box-shadow (elevation) to the PDF viewer's viewport.
MHShetty added a commit to MHShetty/PdfViewer that referenced this issue Aug 11, 2021
MHShetty added a commit to MHShetty/PdfViewer that referenced this issue Aug 11, 2021
@MHShetty MHShetty linked a pull request Aug 13, 2021 that will close this issue
@schildbach
Copy link

schildbach commented Aug 25, 2021

Any increase in "zoom in factor" would be welcome, even 1.5× (on top of the current max). Of the couple of PDFs I tried to read during the last weeks (e.g. festival timetables, covid certificates) not a single one was readable except for big titles etc.

Even a "digital zoom" (pixel based) would help. That way, the PDF doesn't need to be rendered at a higher resolution. Only the rendered output would be projected at the screen with a magnification.

@zygfryd
Copy link

zygfryd commented Nov 9, 2021

So here's an anecdote about this issue. I went to a pharmacy today to get my digital prescription filled, it came in an e-mail in a PDF. I couldn't zoom in far enough to make it readable by a barcode scanner, or a regular pair of human eyes. Fear not, I did get my meds in the end, but the lack of fitness for its intended purpose of this mobile PDF Viewer was surprising.

Thanks for working on this issue, hope the fix gets merged soon.

PS. My PDF took less than 1/3 of the width of the screen in portrait when fully zoomed in. (Landscape didn't help zoom in further at all).

@MDr164
Copy link

MDr164 commented Feb 7, 2022

Got the same issue as the previous comment. For reading datasheets on the go it's sufficient but when I want to use the viewer to display digital train, expo or any sort of ticket that got a QR on it, it's always much too small for the reader to pick up the correct code. Right now my workaround is using MuPDF for tickets or anything with a QR or barcode on it and this viewer for regular text. I also didn't know zooming a PDF would eat that much memory honestly but as it's only important for things like a QR or barcodes in my opinion (human eyes are usually better at interpreting text than those digital readers) a pixel based zoom might suffice.

@thestinger
Copy link
Member

The reason it uses a lot of memory is because we currently always use HiDPI rendering unlike most other PDF Viewers which are using scaling up pixels 2x or 4x. You should be able to see the difference from the appearance of the text compared to a lot of other ones. Using a sandboxed WebView instance with an internally sandboxed pdf.js instance also uses more memory than a whole bunch of memory unsafe C code.

We can implement support for zooming closer but not necessarily another 2x closer, only a bit. We can add support for zooming in even further based purely on scaling rather than rendering the whole page at higher resolution.

@MDr164
Copy link

MDr164 commented Feb 7, 2022

I think a toggle to allow zooming based on scaling is the most reasonable approach then. For me text is fine and those scanners surely wouldn't care about how they got the enlarged QR code. Anyways thanks for the effort of maintaining safe apps like this. Always appreciated to not need to install another app for something as displaying PDFs.

@zygfryd
Copy link

zygfryd commented Feb 7, 2022

We can add support for zooming in even further based purely on scaling rather than rendering the whole page at higher resolution.

Thank you, I think that's indispensable.

EDIT: Let's take into account that Pixel screens are 400-500 PPI, you can zoom in 2x and it'd still be considered HiDPI, zoom in 4x and it's standard DPI. I think up to at least 8x bitmap scaling makes sense on screens like that, if it makes sense to render at full resolution in the first place.

@dbr
Copy link

dbr commented Feb 7, 2022

We can add support for zooming in even further based purely on scaling rather than rendering the whole page at higher resolution

Personally I think this is a good compromise; when I've had trouble reading a PDF at the current maximum zoom, screenshotting it and zooming in with an image viewer resulted in perfectly legible text in the few cases I've tried

@JakobKohler
Copy link

We can support zooming out further but it's unrealistic to support zooming in further

Zooming out further would be great! I often get sent PDFs which are scans of documents (like Adobe Scan) and I can never see the entire page on screen because I can not zoom out enough

@elesto
Copy link

elesto commented Feb 27, 2022

I really need more zooming for subway maps. This is fully zoomed.
Screenshot_20220226-224405

@thestinger
Copy link
Member

It's planned.

@jaimet
Copy link

jaimet commented Sep 11, 2022

London Underground ("Tube") map on max zoom:

Screenshot_20220911-142625

@svrij
Copy link

svrij commented Jun 30, 2023

It's planned.

Just curious: any timeline known when higher scaling (zoom in not necessary for my practical use) will be implemented?

@ViktorF
Copy link

ViktorF commented Oct 27, 2023

Just a quick reminder for this issue.
I have encountered the same practical problem as zygfryd and MDr164 regarding barcode & qr code scanners several times this year. The scanners could never read the codes because I simply could not zoom in far enough. Which is really annoying when, for example, you are at an airport security checkpoint and the whole line is held up because of that.
It got to the point where I considered installing a less secure PDF viewer for this purpose.
In the end, I found a workaround of sorts: Take a screenshot of the pdf and zoom into the picture.
But that is still a bit awkward and shows that it doesn't matter how high quality the zoom is. At least for this use case.

@MDr164
Copy link

MDr164 commented Oct 27, 2023

Just a quick reminder for this issue.
I have encountered the same practical problem as zygfryd and MDr164 regarding barcode & qr code scanners several times this year. The scanners could never read the codes because I simply could not zoom in far enough. Which is really annoying when, for example, you are at an airport security checkpoint and the whole line is held up because of that.
It got to the point where I considered installing a less secure PDF viewer for this purpose.
In the end, I found a workaround of sorts: Take a screenshot of the pdf and zoom into the picture.
But that is still a bit awkward and shows that it doesn't matter how high quality the zoom is. At least for this use case.

I switched to an insecure PDF viewer a long time ago and basically never use the builtin one because the only docs I open are either codes that need to be scanned or small text and neither is usable. The security is just not worth it for me if it fails its purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.