In this post, I’ll be focusing on Chrome simply because of all major browsers, its printing tooling has followed web standards more closely than others’ for at least the last couple of years. Out of this plethora of options, five can be directly or indirectly controlled via CSS: Layout, paper size, Margins, Headers and footers, and Background graphics. #Print to scale chrome macGreat for printing, but not at all what you want on your bespoke PDF! Take a gander at this badly cropped screenshot of Chrome’s Print dialogue:Ĭhrome’s Print dialogue (as it appears on a Mac in early 2021) showing a preview of, appropriately enough, David Bull’s Encyclopedia of Woodblock Printmaking, with all settings set to their defaults. (More about that at the bottom of this post.)īut browsers like to futz with your page en route to generating a PDF: With the best intentions, they add additional margins, fill them with some metadata that you don’t want on your generated document, and get rid of all the background colors. In this case, I was using a good old-fashioned Makefile to generate PDFs using a headless instance of Chrome. Similarly, markdeep-thesis, whose initial development was part of my Master’s thesis (for the purpose of typesetting it), would be pointless without solid in-browser printing.īecause I’m incorrigible 2, I’ve also formatted my personal resume and cover letter template (based on Min-Zhong John Lu’s html-resume) using HTML and CSS – impossible without confidence in the browser’s print functionality. #Print to scale chrome pdfMy project markdeep-slides, which builds on top of the in-browser Markdown renderer Markdeep to enable seamless, setup-free presentation slide authoring and playback, relies on the browser’s built-in print tooling for PDF exporting. When’s the last time you’ve printed a website? If you’re anything like me, that query will return either “long ago” or some kind of NULL value 1 – but the print functionality built into modern browsers isn’t just tremendously handy for precise spilling of black water on dead wood, it can also be coerced into serving as a simple-yet-powerful export-to-PDF method for basic client-side document generators or even server-side applications. Controlling the Settings in Chrome's Print Dialogue With CSS Excessively Adequate Controlling the Settings in Chrome's Print Dialogue With CSS Posted on March 31, 2021
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |