Smokes your problems, coughs fresh air.

Tag: print

Web print is still shit, even for CSS2 print features

Having spent ten yours out of the loop, I had somehow expected browser makers to take some time out of their favorite hobby—moving knobs and settings around—to implement CSS printing support. I’m all for saving paper and all, but requiring me to pipe my HTML through LaTeX to produce halfway decent documents doesn’t feel very 2017ish to me. In 2007, it already didn’t even feel very 2007is to me.

I’m trying to make the articles on nicely printable. The good news is that I can finally style my headings so that they do not end up all alone on the bottom of a page. page-break-after: avoid is finally supported, except that it isn’t in Firefox. Well, I’m still happy. Back in 2007, only Opera supported this.

Next stop: I wanted to replace the standard header and footer slapped on the page with something nicer. It turned out that, yes, @page {} is supported now, which makes this rather easy:

@page {
 : 0;

Except, then I wanted to add the page number, preferrable in the form n/N to the footer, which turned out to be impossible.

Then, I thought: since my publication pipeline starts with Markdown, I might as well convert that to PDF through LaTeX and then hint to the browser to use the PDF version for printing:

<link rel="alternate" media="print" type="application/pdf" href="print.pdf" />

Never mind. Why did I even for one second think that this would be supported?

HP LaserJet 6P under Ubuntu

Because Arnold Pilon is migrating his workplace to Apple, I could get his old PC and peripherals for free. Among its peripherals was an old HP LaserJet 6P, still perfectly working.

My sister didn’t have a printer yet. I was surprised that installing it on her Ubuntu machine was simply a matter of selecting the printer type from a list. I wonder: is this thanks to CUPS? Can I expect this to work in all distros that include CUPS these days?

Anyway, the printer works and the scanner too (of which I forgot to jot down the type). The scanner was supported by Xane without requiring any configuration. When it comes to hardware configuration, open source operating systems often beat those from Redmond.

Setting paper size in Mozilla products

Mozilla products, firefox and thunderbird, seem to have the strange behaviour of overriding the paper size set by the operating system; it scales the page to letter and then prints it to A4.

To fix that, you need to go into about config and set the print_paper_data parameter to 9.

© 2022 BigSmoke

Theme by Anders NorenUp ↑