Toolbar PDF Viewer on JQUERY

1 Answer 81 Views
PDFViewer Switch (Mobile) Toolbar View
Carlos Alexandre
Top achievements
Rank 1
Carlos Alexandre asked on 05 Oct 2023, 07:48 PM

Hello, 

I got a custom button on my toolbar , which opens a modal, but , when i tried to open in mobile mode , it stops working

see the code below

 

    $('#pdfViewer').css('width', '100%');
    var request = new XMLHttpRequest();
    request.responseType = 'blob';
    request.onload = function () {
        var reader = new FileReader();
        reader.readAsDataURL(request.response);
        reader.onload = function (e) {
            $("#pdfViewer").kendoPDFViewer({
                pdfjsProcessing: {
                    file: {
                        data: e.target.result.split(",")[1]
                    }
                },
                toolbar: {
                    items: [ 
                        "zoomInOut",
                        {
                            type: "button",
                            name: 'Description',
                            template: '<button type="button" onclick="openModal()" title="Description" class="k-button k-button-md k-button-flat" id="btn-Description"><span class="k-icon k-i-toc-section-level"></span></button>',
                        }
                    ]
                },
                width: "100%",
                height: 760
            }).getKendoPDFViewer();
        };
    };

 

on browser desktop modal it works normally

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 10 Oct 2023, 11:13 AM

Hello, Carlos,

I tested this example with a Kendo Window on my mobile device, and it is showing upon pressing the button. Could you please let me know if it works for you, or if I am missing something from the issue?

Regards,
Martin
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
PDFViewer Switch (Mobile) Toolbar View
Asked by
Carlos Alexandre
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or