on 04-10-2019 1:31 AM
Hi There,
I need to generate report in the client side based on certain filter criteria. I am using sap ui5 library with js view and standard page layout. My report page contains couple of tables, stacked bar chart, radial chart, viz frame and some texts. I tried using each of these or combination of these- jsPDF, html2pdf and html2canvas for converting to pdf. It did not generate entire page. If I convert one by one for tables and charts it converts to pdf and if I combine all of them, it creates multiple pages for each of the controls. I need to convert all in one pdf document. Is it even possible to convert entire page into single pdf, if yes could anyone please share the code.
Hi,
Yes, you can use jsPDF javascript library to generate PDF on client side. This is not same as smart forms, but this has some formatting options available. Try below link for additional documentation.
https://raw.githack.com/MrRio/jsPDF/master/docs/
Thanks,
Dheeram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vamsi,
Thank you for your answer. The problem is we don't use Odata service for back end. So we can't use form. Is there anyone who has done this in the past with proper formatting at the client side?
Regards,
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
a bit of a roundabout way to do this,
but when we generate a PDF, we use a back end service that generates a PDF based on an existing smart form which uses the data supplied by the UI5. or it could use the data that is already there in the back end.
so if you want a properly formatted PDF with fixed format, use a back end service that generates a smart form and then convert that to PDF.
Kind regards,
Vamsi
PS: if there is another way to create a PDF directly from SAPUI5 with proper formatting, i would like to know and will be following this thread for inputs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.