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

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

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: 9.0.0
    • Fix Version/s: 9.5.1
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 9.5.1 S1

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                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