OrgChart icon indicating copy to clipboard operation
OrgChart copied to clipboard

Issue in exporting PDF

Open Divyam192001 opened this issue 6 months ago • 0 comments

  1. While exporting PDF, some child nodes that are on the right side are not getting printed in PDF. I have tried inline css also and other option but it is not working.

$('#export-pdf').on('click', function () { exportFullChart('pdf'); }); function exportFullChart(type = 'png') { const $originalContainer = $('#chart-container'); const originalStyle = $originalContainer.attr('style') || ''; const companyName = '@Model.CurrentCompany.OrganisationName'; const exportName = companyName.replace(/\s+/g, '_') + '_OrgChart';

// Clone the DOM node only const $clonedContainer = $originalContainer.clone(); const $offscreenWrapper = $('

') .css({ position: 'absolute', top: '-9999px', left: '-9999px', width: $originalContainer.outerWidth(), height: 'auto', overflow: 'visible', }) .append($clonedContainer) .appendTo('body');

setTimeout(() => { orgChartInstance.export(exportName, type); $offscreenWrapper.remove(); }, 500); } 2. While exporting PDf, some extra white space is coming in the right side

Divyam192001 avatar Jul 10 '25 05:07 Divyam192001