The printed font has become the normal font size
See original GitHub issueSystem:(windows7 ultimate sp1 x64)
browser:(Microsoft Edge 是最新版本。 版本 87.0.664.30 (官方内部版本) beta (64 位))
Print.js version:1.5
html:
<form method="post" action="#" onclick="return false;" runat="server" id="printJSform" name="printJSform">
<span class="h3">XXXXXXXXXX</span>
<h3>XXXXXXXXXX</h3>
</from>
script:
printJS({ printable: "printJSform", type: "html", css: ['../bootstrap/css/bootstrap.min.css?v1'], targetStyles: ["*"] });
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How do I adjust the font size on my printer? - CDP Help Center
Sometimes, your font may be too large or small when printing. This article discusses how to adjust the font size. · 1. Locate...
Read more >My printer is printing text too small and I've changed text size
All I have been trying to do is print out mapquest driving instructions-I select the size font and the print comes out sooo...
Read more >How to: Restore the default displayed font size on your computer
To set your computer's displayed font size to default: Browse to: Start>Control Panel>Appearance and Personalization>Display. Click Smaller - 100% (default).
Read more >Font Size changes when switching to a different printer
It may happen that the font size changes unexpectedly for some text in a label design when using a different printer than the...
Read more >How to Make Your Printer Print Bigger Fonts
Increase the font size when printing a web page. Click "File" and select "Print Preview." Change the "Scale" percentage to make it larger....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey guys, the library has properties for font family and size, and those properties have default values. They are already deprecated and will be removed in the next version of the library. I hope we can release that soon. In the meantime, please manipulate these values. https://github.com/crabbly/Print.js/blob/master/src/js/init.js#L46
Also, for better print results, instead of using
targetStyles
, I would recommend using thestyle
andcss
properties instead. You can pass your stylesheets into thecss
property, or simple styling withstyle
.To manipulate the print results even more, I recommend also exploring print media queries. This will give you a better control over the print results without affecting your interface layout. Hope this helps. Feel free to reopen this issue if necessary.
@crabbly I am facing an issue when setting font-size. Can you help to check if there is any issue with the code? I am using vue framework template:
style.css here:
in print preview, the font size isn’t changed.