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.
Regards,
Velusamy
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.
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"]'));
};