You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$10
For Premium members:
In this article, I am going to explain how to generate PDF file from an HTML page using AngularJS in SharePoint. This is the effortless way to port the SharePoint list data or any other list data to carry, print, and make a hard copy.
Introduction
In this article, I am going to explain how to generate PDF file from an HTML page using AngularJS in SharePoint. This is the effortless way to port the SharePoint list data or any other list data to carry, print, and make a hard copy. Unless we generate PDF files with the SharePoint list data, we can’t take it out of a SharePoint Server to manipulate the data physically. This is useful when we don’t work with systems, such as when we are offline, we get power cuts, or facing internet issues.
Step1
The following is the data from my SharePoint list which I would like to convert into a PDF file. Get the desired above data from SharePoint list and display in the web page, as below.
This is how we display the data in a web page. And, the same way, we are going to make it as a PDF file. HTML code for the above UI
Here is the HTML code for the look and feel of the above webpage.
Step 2 Script code for retrieving the data from SharePoint list
This is the script code for retrieving the desired data from the SharePoint list using Angular with REST call.
Step3
HTML code for the above PDF This is the HTML code for the above look and feel. Here, the data is retrieved from the SharePoint list which we wanted to generate as a PDF file.
References for PDF files
These are the needed JS files to generate the SharePoint list data into a PDF file.
See the results on screen.
A file has been downloaded.
Hence, we have downloaded the PDF successfully for the desired SharePoint list item. Conclusion
In this article, we learned how to generate a PDF file from a SharePoint list item using AngularJS. This will help us to take out a particular SharePoint list item into a PDF file to make a hard copy.
Azure in 24 Days