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.

Component not showing properly

Thread ID:

Created:

Updated:

Platform:

Replies:

118166 Feb 6,2015 11:43 AM Feb 9,2015 04:51 AM ASP.NET MVC (Classic) 1
loading
Tags: PdfViewer
Miguel Martinez
Asked On February 6, 2015 11:43 AM

Hi, im triyng to use the PDF Viewer component but its not working.

I have add the assemblies and namespace reference but after compiling the pdf viewer component is showing this way.

@using Syncfusion.PdfViewer.Mvc;
@using Syncfusion.Mvc.Shared;
@using Syncfusion.Mvc.Tools;
@using Syncfusion.Mvc.Pdf;

@{ Html.Syncfusion().PdfViewer("PdfViewer")
        .Load((string)ViewData["file"])
        .PdfParamsArgs((PdfViewerParams)ViewData["PdfParam"])
        .Width(System.Web.UI.WebControls.Unit.Pixel(1000))        
        .Render(); }


Im using MVC 5. I have attached a picture of the page.

Attachment: Sin_título_1fdc29c0.zip

Deepak Gunasekaran [Syncfusion]
Replied On February 9, 2015 04:51 AM

Hi Miguel,

Thank you for your interest in Syncfusion products.

We are not able to reproduce the problem in creating sample using MVC5 as in your screenshot. This problem may occurred due to missing <handlers> in Web.config. We have attached a PdfViewer sample in ASP.NET MVC Classic using MVC5 in the following link for your reference.

Attachment:

http://www.syncfusion.com/downloads/support/directtrac/118166/PdfViewerDemoMVC5-685936241.zip

In this sample we have included the following snippet inside <system.webServer>

<handlers>

      <remove name="syncfusion_generatepdf" />

      <remove name="MvcResourceHandler" />

      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />

      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />

      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />

      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />

      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />

      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

      <add verb="*" path="syncfusion_generatepdf.axd" name="syncfusion_generatepdf" type="Syncfusion.PdfViewer.Mvc.PdfViewerHandler, Syncfusion.PdfViewer.Mvc, Version=12.4500.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />

      <add verb="GET,HEAD" name="MvcResourceHandler" path="MvcResourceHandler.axd" type="Syncfusion.Mvc.Shared.MvcResourceHandler, Syncfusion.Shared.Mvc, Version=12.4500.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />

    </handlers>

Please try this sample and let us know if you face any issues.

Thanks and Regards,

Deepak G



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.

;