mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-28 17:03:39 -05:00
1.4 KiB
1.4 KiB
title | date | draft | tags | medium_enabled |
---|---|---|---|---|
PDF To Kindle | 2020-06-14T21:54:21-04:00 | false | true |
This post will outline a process I take in order to get content from a website onto my Kindle.
Suggested Software
- To save a webpage as a PDF, we will use WeasyPrint.
- To convert the PDF into a more Kindle readable format, including converting math type properly, we're going to use k2pdfopt.
- Finally we're going to use Calibre to copy metadata and convert to an ebook format.
sudo apt install weasyprint k2pdfopt calibre
Process
Now I'll show how we can take the Noise Protocol specification and send it to the Kindle.
First let's download the page as a PDF
weasyprint https://noiseprotocol.org/noise.html noise.pdf
Then let's use k2pdfopt
to convert the PDF to a more Kindle friendly format,
k2pdfopt noise.pdf -ui- -x
This will produce the file noise_k2opt.pdf
, but sadly without the metadata. We can copy that over,
ebook-meta noise.pdf --to-opf temp.opf && \
ebook-meta noise_k2opt.pdf --from-opf temp.opf && \
rm temp.opf
Finally we can convert it to a Kindle friendly file format.
ebook-convert noise_k2opt.pdf noise.azw3
This will give us noise.azw3
which we can then transfer over to the Kindle.