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. Image for the cookie policy date

Component not showing properly

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

1 Reply

DG Deepak Gunasekaran Syncfusion Team February 9, 2015 09:51 AM UTC

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



Loader.
Live Chat Icon For mobile
Up arrow icon