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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Load PDF failed

Thread ID:

Created:

Updated:

Platform:

Replies:

125307 Aug 7,2016 10:36 AM UTC Aug 8,2016 10:12 AM UTC ASP.NET MVC 1
loading
Tags: PdfViewer
Andre Karner
Asked On August 7, 2016 10:36 AM UTC

Dear community,

since 2 hours im trying to load an pdf through stream or local file into my pdf viewer.
everytime im getting an exception: "The given key was not present in the dictionary".

This exception occurs when im executing following method "var output = helper.ProcessPdf(jsonResult);"


My View:

@using Syncfusion.JavaScript.PdfViewerEnums
 
@{
    ViewBag.Title = "Rechnungsansicht";
}
 
<h2>Rechnungsansicht</h2>
 
@Html.EJ().PdfViewer("invoicePdfViewer").ServiceUrl("/Invoice").PdfService(PdfService.Local);

My Controller action:

public object PostViewerAction(Dictionary<stringstring> jsonResult)
       {
           if (Request?.UrlReferrer != null)
           {
               var invoiceIdStr = HttpUtility.ParseQueryString(Request.UrlReferrer?.Query)["invoiceId"];
 
               if (string.IsNullOrEmpty(invoiceIdStr))
                   throw new Exception("Rechnung nicht gefunden!");
 
               var invoiceId = Convert.ToInt32(invoiceIdStr);
 
               var helper = new PdfViewerHelper();
 
               //var t = new Thread(GetInvoicePdf);
               //t.SetApartmentState(ApartmentState.STA);
 
               //t.Start(invoiceId);
               //t.Join();
 
               helper.Load(@"C:\tmp\R000001.pdf");
 
               var output = helper.ProcessPdf(jsonResult);
               var response = JsonConvert.SerializeObject(output);
               return response;
           }
 
           return null;
       }

Please help me!

Thanks!

Regards,

Andre

Sabari Anand Senthamarai Kannan [Syncfusion]
Replied On August 8, 2016 10:12 AM UTC

Hi Andre, 
 
Thank you for choosing Syncfusion products. 
 
We have created a new incident under your account for your queries in your last update. We request you to follow the new incident for further updates. You can log in to our support system using the following link,  
  
 
Regards, 
Sabari Anand

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.

Warning Icon 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.Close Icon

;