We have a angular component with a data grid with pagination. There is a download as PDF feature we are going to introduce in the application. In this feature, whole data which can be seen with pagination on the data grid will be available in the PDF. Since the data can be huge (thousands of rows), we thought to use the Angular Universal to use the existing component and get the PDF with jsPDF. But I am not able to find any example where a component can be rendered and used at server side to generate the PDF. I thought to make use of express to expose an API endpoint which will get the component and render it with data at server side and using the jsPDF file can be generated.
Any example of snippet of code would be helpful.
Server side in Angular universal Can't render or call any component in your app it work around index.html only.
If I understand your question, Briefly you want to download data in pdf file from angular app but you need the style of component in pdf
If you will convert the only part of data displayed on screen you can use any PDF Packages for for angular like jspdf
If you need to covert all data (thousands of rows) , build a service in angular to gel all data and render view with the same style without pagination and convert it to pdf
(Server Side) make a request to get all data in server file server.ts (express js code) and render it using pdf package then call the request as api in anular app to start download pdf file