We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Load file

Thread ID:

Created:

Updated:

Platform:

Replies:

124130 May 18,2016 09:32 PM May 19,2016 08:45 AM ASP.NET MVC 1
loading
Tags: PdfViewer
Kevin Burns
Asked On May 18, 2016 09:32 PM

Using the sameple provided for the PDF Viewer control, I can load a file by filename at runtime. I need to pass a file id or name as a paramater.  In the Jquery I have the following:

 <script>
        $(document)
            .ready(function() {
                var ejPdfViewer = $("#pdfviewer").data("ejPdfViewer");
                 ejPdfViewer.load(@ViewBag.Url);
            });
    </script>

VieBag.Url has the link, which loads fine but any page past the first will not. The filename is only sent one time during the process. Any help would be greatly appreciated. 

Parthipan R [Syncfusion]
Replied On May 19, 2016 08:45 AM

Hi Kevin, 
Thank you for using Syncfusion products. 
We can load the PDF document in PdfViewer by passing file name as parameter in load method. Please refer the below code snippet. 
$(document) 
       .ready(function () { 
           var fileName = "Barcode.pdf"; 
           var ejPdfViewer = $("#pdfviewer").data("ejPdfViewer"); 
           ejPdfViewer.load(fileName); 
       }); 
We have also provided a sample to illustrate the same. Please find the sample from the following link. 
Note: Please make sure that the PDF document is available in data folder. 
Regards, 
Parthipan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;