srcset and printing

"Today I learned something new and stupid."

I should know that everything involving printing is just... perma-stupid. But still.

I've been tweaking both web sites to use <IMG SRCSET> in a few places in an attempt to speed things up a bit by downloading less data. The spec for SRCSET is actually pretty sensible, allowing the browser to download an appropriately-sized image based on the size of its window, the relationship between screen pixels and display pixels, and your hint as to how much of the screen the image will take up..

So let's say you've got a stack of SRCSET images, and the image on your screen is, let's say "five inches" wide, whatever that means, and the vagaries of the world result in the 768px image being used for that. So then you hit print. And now you're going to be printing a "five inch" image on a 300dpi device. Does it use the 1600px image for that?

The hell it does. It scales up the blurry-assed 768px image.

Safari, Mozilla, Chrome and Opera all do this.

This is annoying, because in the DNA store, when you buy a ticket, you are presented with a page with a image of your ticket on it, like so:

One of the common use cases here is "print it out and take it with you". So I've been serving 1600px PNGs, so that they will print well. But it sure would be nice if the people who aren't printing were being served a smaller file.

So I guess my choices are to keep serving large images always, or have prints be blurry. "Hooray."

Maybe there's some nuttery I could do with @print stylesheets in the CSS to override the SRC but that sure sounds fragile.

I mean, hopefully most people are using the Apple Wallet pkpass attachment we send them instead of printing, but still, this is dumb and ought to work.

Incidentally, is there some Android equivalent of pkpass? I'm including the Google-recommended EventReservation microformat in the confirmation email, but I tend to assume that microformats are still just wishful thinking. I haven't seen any documents suggesting that this format actually does anything anywhere. Does it? If it does, what does it look like? (Go buy a DNA ticket and send me a screen shot.)

Previously, previously, previously, previously.
Tags: , , , ,

  • Previously