Unplanned
Last Updated: 04 Oct 2021 07:50 by ADMIN
Velusamy
Created on: 03 Mar 2021 17:09
Category: PDFViewer
Type: Feature Request
12
Add support to rotate the pages in PDFViewer

Dear Team,

As like in other frameworks (https://pspdfkit.com/) we should have the in built option to rotate the PDF pages using Kendo UI PDFViewer widget.

https://web-examples.pspdfkit.com/annotations?i=7KSM53H6QBTN7G45WA030T9C0R.C3YbvdyO2FG3Et1PMQ1btA.KV3y

 

 

Regards,

Velusamy

2 comments
ADMIN
Neli
Posted on: 04 Oct 2021 07:50

Hello Sergey,

Thank you very much for suggesting a workaround to the issue. I am sure the suggested approach will be helpful to the other users who need to rotate the file in the PdfViewer

In the Dojo linked here, you will find another possible approach. Please note that if when you download/print the file, it will be displayed in its original state, meaning that the rotation will not be preserved.

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Sergey
Posted on: 27 Sep 2021 11:18

Hello,

Workaround:

    kendo.ui.PDFViewer.prototype.rotateFeature = function() {
        var me = this;
        var degree = 0;
        var button = $('<a href="#" class="k-flat k-button k-button-icon"><span class="k-icon k-i-rotate"></span></a>')
            .on('click',
                function() {
                    degree += 90;
                    if (degree === 360)
                        degree = 0;

                    for (var i = 0; i < me.pages.length; i++) {
                        me.pages[i].element.css('transform', 'rotate(' + degree + 'deg)');
                    }

                });
        button.insertBefore(this.toolbar.element.find('div[data-command="ZoomCommand"]'));
    };