sandanat / vue-pdf-app

VUEjs v2 PDF viewer based on Mozilla's PDFJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prop pageScale doesn't work

w5400013936 opened this issue · comments

Please provide a working example with a bug (git repo, codesandbox, source code at least, etc).
It takes a lot of time to set up environment to confirm an issue.
So I will resolve issues faster.

Configuration:

  • Web browser and it`s version:
    app runs on the phone
  • Operating system and it`s version:
    android, ios
  • vue-pdf-app version:
    2.1.0

Steps to reproduce the problem:

init vue-pdf-app with the prop "pageScale"

What is the expected behavior?

the page should be scaled

What went wrong?

prop pageScale doesn't work

Attachments (screenshots, links, etc)

image
image

Does it work right on a computer?

@w5400013936 @sandanat
page-scale does not work properly.
But @pages-rendered work.

<VuePdfApp :pdf="pdf" theme="dark" @pages-rendered="pagesRendered" />

<script>
methods: {
  pagesRendered(vuePdf) {
    setTimeout(() => (pdfApp.pdfViewer.currentScaleValue = "0.2"))
  }
}
</script>

AppOptions.set("disableHistory", true);
Just turn off this feature