I tried both versions of html2pdf v0.10.1 and ^0.9.3 and got the same issue when exporting the table to Pdf. It's content looks faded/muted, whereas the table header and borders look good:
Interestingly, this happens only with one table, all other data and similar tables are exported fine. Here's the JS:
var element = document.getElementsByClassName(elementClass)[0];
var opt = {
margin: 1,
filename: filename,
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2, useCORS: true },
jsPDF: { unit: 'in', format: 'a4', orientation: isMobile? 'portrait': 'landscape' }
};
html2pdf().set(opt).from(element).outputPdf().then(function (pdf:any) {
dotNetObj.invokeMethodAsync('FinishExporting');
}).save();
Am I missing any other configuration? Any help is much appreciated!
from html2pdf, table content is faded

No comments:
Post a Comment