Live data from Hacker News

CSS for printing to paper

voussoir.net

131–139 of 139 posts

Re: CSS for printing to paper

#134

Earlier quoted context omitted.

oh to be young and a dreamer. now, i just want to get work done with the most efficient tool for the job. that kind of hell is for the young

I just worry that the growing generations don’t degrade typesetting quality too much… Not that it’s particularly stellar in the mainstream, but I sure hope it wouldn’t get even worse!

Luckily for the younger generations, there's no text to typeset in a tiktok video. It's not like they are reading text anyways. Everything now is a TL;DR or some other summary in short tweet like blurbs which may or may not even be a complete sentence. Any post with extra text providing the background or finer details is lambasted as being too wordy.

Re: CSS for printing to paper

#135

Earlier quoted context omitted.

I just worry that the growing generations don’t degrade typesetting quality too much… Not that it’s particularly stellar in the mainstream, but I sure hope it wouldn’t get even worse!

Luckily for the younger generations, there's no text to typeset in a tiktok video. It's not like they are reading text anyways. Everything now is a TL;DR or some other summary in short tweet like blurbs which may or may not even be a complete sentence. Any post with extra text providing the background or finer details is lambasted as being too wordy.

[dead]

Re: CSS for printing to paper

#136

Browser support for printing is so bad that I'm going to have to create a native app for https://www.thingybase.com to have a streamlined workflow of printing labels to a thermal label printer. It works now, but first you have to download a PDF and print that. Google Docs does this too when you hit "Print". I've tried hacks like load the PDF in an iframe and use some JavaScript to print that, but then I get footers w…

I did this a long time ago. Made a small qt app and hooked it to the `print://` scheme in the Windows registry, so in the web server I just had to change a link to `print://example.com/whatever` and the app would load the url and send it to the printer, for the website's domain it would skip any confirmation.

Re: CSS for printing to paper

#137
I use a .pagebreak class that puts a page break before stuff.

Then I tell it not to break sections and articles unnecessarily , and let the browser figure it out .

Not a fan of embedding specific sizes into the CSS, I often(Well, not really often as I'm only printing a few times a year) like to print A5.

A4 makes it annoying to try to hold a binder in one hand and takes more space than it really needs to.

Re: CSS for printing to paper

#138

Earlier quoted context omitted.

What browser does it work in natively? I tried this a couple of years ago and a few people claimed that it worked in kiosk mode for Chrome but I couldn't get it to work in any browser.

It looks like it should be available in all major browsers. https://developer.mozilla.org/en-US/docs/Web/CSS/@page#brows... That said, I've always used paged.js with its polyfills to fill in other gaps. So maybe there's something I'm unaware of.

@page probably works for some things but when I tried to do page numbers it definitely didn't. I ended up hacking something together (absolute positioning a number every ~700px or whatever so it sat on the same place each page).
Post reply on HN