Export page with multiple Wijmo Controls

Posted by: joe on 29 August 2019, 9:40 am EST

  • Posted 29 August 2019, 9:40 am EST

    Hi!

    I have a page that has 4 line charts, 2 flex grids, and 1 pie chart that I’d like to export to PDF. I can export each grid to excel and each chart to .png, but I’d like to package them together as they appear on the page and produce a .pdf. Is there a way to do this with the Wijmo library?

    Thanks!

    Joe

  • Posted 30 August 2019, 4:25 am EST

    Hi Joe,

    You may create an empty PdfDocument and export the FlexGrid and FlexChart to it. To add FlexGrid to the document, use the draw method of FlexGridPdfConverter and to add FlexChart to the document, you may first save the chart to a base64 URI using the saveImageToDataUrl method and then use the drawImage method of the PdfDocument class to draw the chart’s image. Please refer to the sample attached.

    Regards,

    Ashwin

    PDF_ExportControls.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels