Print.js icon indicating copy to clipboard operation
Print.js copied to clipboard

class or style font-size is not working

Open Carry-Ku opened this issue 3 years ago • 8 comments

Such as, I use Print.js,I want to get a new font-size, i put it in class or style,It's not working, how

Carry-Ku avatar Jan 12 '22 07:01 Carry-Ku

Try to use an printjs v1.3.1, printjs add font-size: font_size !important on new version.It caused some font-size to be ignored. Or wait for the author to release v2.

fooooxxxx avatar Jan 17 '22 08:01 fooooxxxx

+1

4KDA avatar Feb 03 '22 16:02 4KDA

set font_size: "" in printjs settings seems to working to be a work around for this

borisdmt avatar Mar 10 '22 08:03 borisdmt

+1

qq919501422 avatar May 06 '22 07:05 qq919501422

set font_size: "" in printjs settings seems to working to be a work around for this

const style = '@page { } ' +'@media print { .f-14{ font-size: 14ppx }' ; printJS({ printable: "printTable", type: "html", header: null, targetStyles: ["*"], style: style, });
I wrote this way, but I still don't work. How did you write it?

shenjilina avatar Aug 03 '22 03:08 shenjilina

set font_size: "" in printjs settings seems to working to be a work around for this

const style = '@page { } ' +'@media print { .f-14{ font-size: 14ppx }' ; printJS({ printable: "printTable", type: "html", header: null, targetStyles: ["*"], style: style, }); I wrote this way, but I still don't work. How did you write it?

u should set font_size: '' same:

printJS({
     printable: "printTable",
     type: "html",
     header: null,
     targetStyles: ["*"],
     style: style,
     font_size: ''
});

tuan6956 avatar Sep 13 '22 17:09 tuan6956

set font_size: "" in printjs settings seems to working to be a work around for this

const style = '@page { } ' +'@media print { .f-14{ font-size: 14ppx }' ; printJS({ printable: "printTable", type: "html", header: null, targetStyles: ["*"], style: style, }); I wrote this way, but I still don't work. How did you write it?

u should set font_size: '' same:

printJS({
     printable: "printTable",
     type: "html",
     header: null,
     targetStyles: ["*"],
     style: style,
     font_size: ''
});

thanks!

499433627 avatar Sep 20 '23 08:09 499433627

nb

qiushuanglin avatar Apr 03 '24 07:04 qiushuanglin