When exporting, the text from the time headers disappears. My code on the export is below, with screenshot and export attached as files.
function exportFile() {
var exportAs = $('input[name="radioExportAs"]:checked').val();
var exportArea = $('input[name="radioExport"]:checked').val();
switch (exportAs) {
case 'png':
exportPNG(exportArea)
case 'pdf':
exportPDF(exportArea)
}
}
function exportPNG(exportArea) {
dps.exportAs("png", { area: exportArea }).download();
}
function exportPDF(exportArea) {
let options = [{ year: 'numeric' }, { month: 'numeric' }, { day: 'numeric' }];
let joined = join(new Date, options, '-');
var doc = new jsPDF("landscape", "mm", "a3");
doc.setFont('Verdana','normal','normal')
doc.setFontSize(20);
doc.text(5, 10, "KHM Ops Scheduler");
var image = dps.exportAs("jpeg", {
area: exportArea,
scale: 2,
quality: 0.95
});
var dimensions = image.dimensions();
var ratio = dimensions.width / dimensions.height;
var width = 410;
var height = width / ratio;
doc.addImage(image.toDataUri(), 'JPEG', 5, 15, width, height);
DayPilot.Util.downloadBlob(doc.output("blob"), joined + "-KHMOPS_scheduler_export.pdf");
}