Angular2 PDF Viewer through API

Posted by: chifret on 4 October 2017, 2:37 am EST

  • Posted 4 October 2017, 2:37 am EST

    Hi,

    I’ve got an API that render a PDF :

    http://localhost/api/report/2017-10-4
    

    Using angular-cli, it’s defined so :

    config.Routes.MapHttpRoute("Report", "api/report/{date}", new { controller = "Report", action = "Get" });
    

    When I call it with the PDF viewer, it doesn’t find the route, because the parameter “/$pdf?_={timestamp}” that’s added by the viewer seems to make the route unmatchable. Should it be a “/{item?}” but it seems not…

    Any idea how to solve that ?

    Thanks a lot !

  • Posted 8 October 2017, 7:20 pm EST

    Hi,

    We are sorry for the late reply.

    If we are correct, you have setup the C1 WebAPI for PDFDocument service. Now, you would like to show the PDF for in PDF Viewer.

    If yes, please refer to the sample once. If the issue persists, please share an demo sample depicting you issue to investigate the actual cause.

    http://demos.wijmo.com/5/Angular2/PdfViewerIntro/PdfViewerIntro/

    Thanks,

    Manish Kr Gupta

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels