Skip to content

How to enable non-native pinch-to-zoom on mobile in viewer.html? #16328

Description

@3rd3

I am trying to use the PDF viewer in an <iframe> like this:

<meta name="viewport" content="width=device-width, initial-scale=1.0">
...
<iframe src="/api/v1/web-embed/proxy?proxyUrl=https%3A%2F%2Fgithub.com%2Fmozilla%2Fpdf.js%2Fissues%2Fpdfjs-3.5.141-dist%2Fweb%2Fviewer.html%3Ffile%3D%252F%26lt%3B%3F%3D%2520%24filename%2520%3F%26gt%3B&mode=full" frameborder="0" style="height: 100%; width:100%;"></iframe>

However, when zooming in on iOS, it uses the native zoom from Safari/WebKit/UIkit, meaning the toolbar may disappear and the text gets blurry.

Is there a way to use the recently introduced pinch-to-zoom functionality on mobile devices in viewer.html? The merge #15886 mentioned in #2582 appears to be related, but I could not figure out how to use or enable it. Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions