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

Provide an "auto rotate" feature to support landscapes PDF files

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 9.5.1
    • 9.0.0
    • Components
    • Security Level: Jimmy
    • ZK 9.5.1 S1

      Current state

      PDF documents have a print direction and a display direction.
      A landscape document may be displayed incorrectly (90deg rotated) in the current pdfviewer.

      Desired improvement

      add a autoRotate property to pdfviewer (true by default).

      apply the rotation by default (follow pdf.js behavior)
      the viewer should add the page rotation info to the component's own rotation when loading a page.

       

      let viewport = page.getViewport({scale: this._zoom, rotation: this._rotation}),
      
      becomes:
      
      let viewport = page.getViewport({scale: this._zoom, rotation: this._rotation + page._pageInfo.rotate }),

      in Pdfviewer.ts#L455

            rudyhuang rudyhuang
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h