I am trying to use pdfExport plugin and get the pages from the exporter.export(config) and write the HTML content to a new window and print instead of server print. It might not be a recommended approach but any alternative way to print on the client side. As the pages from the exporter provide an entire HTML document array, any suggested approach would be helpful.
Thanks for the snippet, This is almost similar to what I was doing currently, apart from registering it
pdfExport: {
onExportDialogExport: function({
values
}) {
const me = this;
let config = me.buildExportConfig(values);
config.exporterConfig = Sch.ObjectHelper.assign({
type: config.exporterType,
translateURLsToAbsolute: config
.translateURLsToAbsolute,
keepPathName: config.keepPathName
}, config.exporterConfig || {});
let exporter = me.getExporter(config.exporterConfig);
let pages = new Promise((resolve, reject) => {
resolve(exporter.export(config));
});
pages.then(data => {
//need to print the pages
}).catch(e => console.log(e));
}
}
To print them in a new window, anything specific that needs to be taken care of? because the array consists of an HTML string that also has the related scripts which are included in the scheduler page.
Each page individually loading in an iframe is one workaround we did to be able to load the pages and print.
Can we expect the pdfExport to support vertical mode in the scheduler any soon? as currently as an alternative we have to switch to horizontal mode to print.
While printing when there are more resources on the scheduler, the time ranges are not displaying correctly on the bottom pages, since time ranges are appending to dom dynamically, by the time scheduler is scrolled and pages are captured, time ranges are not appending to dom, so on print pages, they are not displaying.
On the first few pages they display correctly, other pages to the bottom are not displaying the time ranges. It should show up as white, instead, they are empty, check from the resource "Khushi Ram"
Is it possible to show all time ranges on dom or adding delay to the scrolling?