tech tips about Apple Music on Alexa devices, and formatting PDFs for a Kindle

If you have a HomePod you can turn off "listening history" for Apple Music on that device, meaning that music your kids or partner listen to using your account doesn't affect your recommendations or "recently played" area. Good feature. No one has a HomePod though.

If you have hooked up you Apple Music account to an Alexa, there is no way to turn off listening history. However, there is a workaround: if you have a family Apple Music account, just assign a dummy family member or a kid's account or something to Alexa. Problem solved. Now kid’s music and so on won’t mess up your stuff.

***

Reading long PDFs is somewhat of a pain because, obviously, they are fixed-layout, non-reflowable documents. You can print them out of course, or just read them on a large computer monitor. Or, you can read them on a tablet that is big enough--but the only tablet that is big enough to read any arbitrary PDF without annoying zooming, panning and scrolling are at least the size of the 12.9" iPad Pro which is not renowned for its holdability. Some PDFs can be read on smaller tablets or even a phone, depending on their text size and layout and whether your reader app has a “just display the text” feature, and the PDF in question works with it. (A given PDF might not have extractable text at all, or it might be OCR’d and terrible, or column layouts or footnotes or any number of things might screw it up.). Also if you have an app that has a reading mode that crops out blank margins, such as PDF Expert, you can probably make do for most documents on smaller devices.

In particular, reading PDFs on an e-ink Kindle can be deadly. In portrait mode the text will likely be too small. In landscape things are better but can be confusing: "next page" will scroll down the document or turn to the next page depending on where you are, sometimes repeating an area from the earlier page. I don't know about you but I want to always have the next text that I read after turning a page to be in the upper left.

So this is what you can do if you want to read long PDFs on a 6" Kindle Paperwhite (or other small ereader). First, download the command line program K2pdfopt. For the purpose of this blog post I will assume you know how to install command line utilities and make them executable, how to give them the proper permissions on recent versions of macOS, and so on. Then run

> k2pdfopt -mode fw -ui- -x

On each PDF you want to process. If you want to batch process a whole folder of PDFs on a Mac at least, use

> for InputItem in *.pdf;do ~/k2pdfopt -mode fw -ui- -x "$InputItem";done

Once they are processed load them onto your Kindle either via USB or Amazon's personal document service.

The PDFs that result from this work very well on a Kindle.

* The program crops white space, both from margins, and between sections of text.

* It does *not* try to extract text or do anything fancy like that--it just treats each PDF as an image file, meaning that the typography remains intact, you don't get weird OCR-style errors, and it works on all PDFs.

* It makes it so that each page of the new PDF is the exact dimensions and size you need for a Kindle--you never scroll through a page. The next page is always a new actual page.

* The PDFs are in landscape mode, which means that most PDFs the process produces are actually reasonable legible. Because they are in landscape mode already, you read them with the Kindle itself in portrait mode, but holding it sideways. You just go to the next page by tapping the bottom, instead of the right (that is, the same place on the Kindle as if you were holding it upright).