-
Notifications
You must be signed in to change notification settings - Fork 775
Open
Description
- 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
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
')
.css({
position: 'absolute',
top: '-9999px',
left: '-9999px',
width: $originalContainer.outerWidth(),
height: 'auto',
overflow: 'visible',
})
.append($clonedContainer)
.appendTo('body');
.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
Metadata
Metadata
Assignees
Labels
No labels