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

Printing an exported diagram

Is there anyway to get this to print a diagram across many pages without scaling either using the print button OR by using the JPG that is exported? Printing is important but it seems like it is not possible to actually take a larger than 1 piece of paper diagram and get it across multiple pages.

What are the options to do this? Is this even possible? Printing org charts for us is extremely important.

Also, print and export seem to ignore the diagrams zoom state. how do you fix that?

3 Replies

SG Shyam G Syncfusion Team August 29, 2019 07:09 AM UTC

Hi Chad, 
 
Query 
Response 
Is there anyway to get this to print a diagram across many pages without scaling either using the print button OR by using the JPG that is exported? Printing is important but it seems like it is not possible to actually take a larger than 1 piece of paper diagram and get it across multiple pages. 
 
What are the options to do this? Is this even possible? Printing org charts for us is extremely important. 
 
Yes, you can print or export diagram to multiple pages. You should also set the width and height of pageSettings and set MultiplePage as true. Please refer to a code example, help documentation and online sample. 
 
Code example: 
// initialize diagram with pageSettings 
  
 @(Html.EJS().Diagram("container").Width("100%").Height("580px").Created("fitToPage") 
    .PageSettings(s => s.Width(550).Height(500).MultiplePage(true)).Render() 
            ) 
 
   <script> 
function exportDiagram(args) { 
            var diagram = document.getElementById("container").ej2_instances[0]; 
            var exportOptions = {};  
            exportOptions.mode = 'Download'; 
            exportOptions.region = 'PageSettings'; 
            exportOptions.multiplePage =’true’; 
            exportOptions.fileName = 'Export';  
            diagram.exportDiagram(exportOptions); 
        } 
        function printDiagram(args) { 
             if (args.item.text === 'Print') { 
                var diagram = document.getElementById("container").ej2_instances[0]; 
                var printOptions = {}; 
                printOptions.mode = 'Data'; 
                printOptions.region = 'PageSettings'; 
                printOptions.multiplePage = ’true’;  
                diagram.print(printOptions); 
            } 
        } 
</script> 
 
 
 
 
 
Also, print and export seem to ignore the diagrams zoom state. how do you fix that?  
The diagram zooming is not considered during printing and exporting. It is a default behavior of our diagram control. 
 
 
Regards, 
Shyam G 



CC Chad Carey August 29, 2019 12:49 PM UTC

Thank you. Is there a way to get the print to fill out an entire page for each piece it prints? The margin thing doesn't do that it looks like it is based off the page setting width and height. So if it goes across multiple pages how do you get rid of the white space on the edges of the pages? with large diagrams (we are using org charts) the export does not seem to split across multiple images.

it also likes to add lots of blank pages.


NG Naganathan Ganesh Babu Syncfusion Team September 3, 2019 01:42 PM UTC

Hi Chad, 
 
On further analysis in our diagram control, the margin value is not considered when we trying to print the diagram in multiple page. So we have considered it as an issue of “Need to print the diagram content alone in multiple when margin set as zero” and the patch for the fix will be available on 24th sep, 2019. 
 
 
Regards, 
 
Naganathan K G 


Loader.
Live Chat Icon For mobile
Up arrow icon