Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4756

Property activePage is reset by src or content in PDFViewer while in initializing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.5.1
    • 9.0.0
    • Components
    • None

      Steps to Reproduce

      <zk>
          <pdfviewer activePage="1" src="example.pdf" width="100%" height="400px"/>
      </zk>
      

      Current Result

      It loads page 1 initially (activePage 0)

      Expected Result

      It loads page 2 initially (activePage 1)

      Debug Information

      Both calling setSrc and setContent resets the activePage to 0.
      It is okay if the loaded PDF is changed dynamically.
      But for initial properties, it shouldn't be reset.

      Workaround

      Call setActivePage at the end

      <pdfviewer src="example.pdf" activePage="1" width="100%" height="400px"/>
      

            rudyhuang rudyhuang
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h