Articles in this section
Category / Section

How to Export the React Diagram as PDF?

2 mins read

Syncfusion® Diagram component allows users to export React Diagrams as PDFs.

Include the PrintAndExport module in your project.

Upon exporting, a popup window appears. In the destination tab of the popup window, you can select ‘Save as PDF’, and the diagram will be exported as a PDF.

function Export() {
   const printOptions = {
     region: 'Content',
     mode: 'Download'
   };
   diagramInstance.print(printOptions);
} 

The export methods of diagram provide additional options:

| Options | Description |
| region| Defines which part of the diagram is exported (“Content” or “Page”)|
| mode | Sets the Mode for the file to be downloaded |
| multiplePage | Boolean indicating whether the diagram should be split across multiple pages|
| pageWidth | Width of the PDF page (if multiplePage is true|
| pageHeight | Height of the PDF page (if multiplePage is true)|

Sample: Click Here

Conclusion
I hope you enjoyed learning how to export React Diagrams as PDFs.
You can refer to our React Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started with configuration specifications. You can also explore our React Diagram example to understand how to create and manipulate data. For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to explore our other controls. If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied