Open where-picturesque opened 5 years ago
Try changing the font size before exporting. Once exported, it returns to the original size.
Example:
$("p").css("font-size", "32px");
html2pdf().from(element).set(opt).toPdf().get('pdf').then(function (pdf) {
$("p").css("font-size", "26px");
}).save();
same question,use js upstairs change fontsize couldn't work out.
@viktordart , it applies those styles to the downloaded pdf but the actual webpage's font size are also changed. Any way to fix it?
Hi @Ansul1 the only way I found was that. Before downloading the pdf, I apply the change to the tags that I want to modify. Right after generating the PDF, I change the labels back to the original size. so that the user does not notice this change, I apply a background with a loader.
hi! why the converted PDF has the same font size,even if dom already set "font-size:26px" and how to increase the fontSize of the whole PDF,it looks so small.
thanks for your answer!