Posted 18 August 2019, 7:51 pm EST
I have a Flexsheet containing more than 2 sheets. How can I export this Flexsheet as PDF
Forums Home / Wijmo / General Discussion
Posted by: teenu.k on 18 August 2019, 7:51 pm EST
Posted 18 August 2019, 7:51 pm EST
I have a Flexsheet containing more than 2 sheets. How can I export this Flexsheet as PDF
Posted 18 August 2019, 8:18 pm EST
Hi,
You will need to iterate over all the sheets in the FlexSheet and draw them on the PdfDocument using the draw method of FlexGridPdfConverter. Please refer to the sample below:
https://stackblitz.com/edit/js-ruiorg
Regards,
Ashwin
Posted 18 August 2019, 11:02 pm EST
Hi Ashwin,
It Works for me. thanks for your response.
Regards,
Teenu
Posted 26 August 2019, 12:00 am EST
Hi,
When I using the draw method of FlexGridPdfConverter in Angular 2 for exporting wijmo flexsheet , after exporting it as pdf the styles applied for the cells were missing in the downloaded pdf. How can I include the customcellcontents using draw method.
Regards,
Teenu
Posted 26 August 2019, 4:32 pm EST
Hi Teenu,
The last parameter of the draw function takes an object of IFlexGridDrawSettings type in which we can set the customCellContent to true. But, it will not work while exporting as the styling is applied to the FlexSheet level which is not available in the instance of the FlexGrid being exported.
You will need to handle the formatItem callback while drawing the FlexGrid to the PDF Document and then style the cells accordingly. Please refer to the sample below:
https://stackblitz.com/edit/js-evj7hy
~regards