We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

how to export diagram component and signature component under same image

Hi team, i was looking into fuctionality where i need to export signature and diagram component under same export image. Can you suggest for the same. Please find code which is currently exporting 2 different images, one from diagramcomponent and one from signature component


function onselect(args) {
  let exportOptions = {};
  switch (args.item.text) {
    case "JPG":
      exportOptions.format = args.item.text;
      break;
    case "PNG":
      exportOptions.format = args.item.text;
      break;
    case "BMP":
      exportOptions.format = args.item.text;
      break;
    case "SVG":
      exportOptions.format = args.item.text;
      break;
    default:
      console.log("abc");
  }
  exportOptions.mode = "Download";
  exportOptions.region = "PageSettings";
  exportOptions.fileName = "Export";
  exportOptions.margin = { left: 0, top: 0, bottom: 0, right: 0 };
  diagramInstance.exportDiagram(exportOptions);
  signature.save(exportOptions);
}

5 Replies

BM Balasubramanian Manikandan Syncfusion Team January 6, 2023 11:51 AM UTC

We can render signature component in diagram with HTML Node but we don't have direct option to export HTML node to image. We should use webkit to export HTML to image format. Please refer to the KB link below for more details.


https://www.syncfusion.com/kb/13298/how-to-print-or-export-the-html-and-native-node-into-image-format



SH shashank hatti January 6, 2023 12:08 PM UTC

Hi team,

So this  advanced Qt WebKit rendering engine can only be accessed using licensed version. Kindly suggest




BM Balasubramanian Manikandan Syncfusion Team January 9, 2023 01:12 PM UTC

No, you can use either trial or license version to access QT WebKit rendering engine.



SH shashank hatti January 9, 2023 01:19 PM UTC

understood manikandan, thank you



PR Preethi Rajakandham Syncfusion Team January 10, 2023 05:53 AM UTC

Hi Shashank,

You're welcome. Glad that your issue is resolved!! Please let us know if you have any further queries on this. We are happy to help.

Regards,

Preethi R


Loader.
Live Chat Icon For mobile
Up arrow icon