You must Sign In to post a response.
  • Category: ASP.Net MVC

    Create PDF using Web API and AngularJS

    Hello Guys,
    I am trying to generate a PDF using Web API and AngularJS. I have a page(html) which is populating with some data related to payslips and other details. Top of the HTML page is displaying the details of the employee, the middle of the page is displaying with the Salary details(deductions, EPF, net salary etc). The bottom of the page is displaying other information for the employee.
    Now I need a button on the middle so that when I click the button, it should take the middle part of the page(salary details) and then open it as a PDF document.
    I have Web API where I want to write a method which will give me JSON results as per my project structure.
    Can anyone provide some work around or similar links so that I can proceed with. It will be helpful to me.
    Thanks in advance.
  • #769151
    Hi Pawan
    Haven't you tried with iTextSharp ? it does support to web API

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #769162
    Hi Pawan,

    I'm not pretty sure using iTextSharp in webAPI, but using API it passes the http data to the end point with credentials for authentication by passing post data, then we can get back the data as a response.

    I guess the below link will help you to demonstrate more on the same.

    http://pdfcrowd.com/html-to-pdf-api/

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


Sign In to post your comments