Javascript 如何将文件加载到剑道PDF查看器?

Javascript 如何将文件加载到剑道PDF查看器?,javascript,jquery,asp.net,kendo-ui,kendo-asp.net-mvc,Javascript,Jquery,Asp.net,Kendo Ui,Kendo Asp.net Mvc,我的视图中有以下PDF查看器,如何根据所选项目更新PDF.File(Url.Content(“~/PDF/test.PDF”) <div id="preview"> @(Html.Kendo().PDFViewer().Name("pdfPreview") .PdfjsProcessing(pdf => pdf.File(Url.Content("

我的视图中有以下PDF查看器,如何根据所选项目更新
PDF.File(Url.Content(“~/PDF/test.PDF”)

 <div id="preview">
            
            @(Html.Kendo().PDFViewer().Name("pdfPreview")
                .PdfjsProcessing(pdf => pdf.File(Url.Content("~/pdf/test.pdf")))
                .Toolbar(toolbar =>
                        toolbar.Items(items =>
                        {
                            items.Add().Name("pager");                               
                        })
                    )
                    .Height(701)
                )
        </div>

   

@(Html.Kendo().PDFViewer().Name(“pdfPreview”)
.PdfjsProcessing(pdf=>pdf.File(Url.Content(“~/pdf/test.pdf”))
.Toolbar(Toolbar=>
工具栏。项目(项目=>
{
items.Add().Name(“寻呼机”);
})
)
.高度(701)
)

您可以像这样加载pdf-我现在无法测试,因此可能会有一些打字错误,但这是基于以下示例:


您可以像这样加载pdf-我现在无法测试,因此可能存在一些打字错误,但这是基于以下示例:

    $.ajax({
        url: `/product/product/pdfDocumentread?documentID=${documentID}&productID=${productID}`,
        type: 'GET'
    })
    .done(function(data) {
       //here I want to load data.DocumentFilePath to PDF preview
       var pdfViewer = $("#pdfPreview").data("kendoPDFViewer");
       pdfViewer.fromFile(data.DocumentFilePath)
    })