Skip to content

Instantly share code, notes, and snippets.

@w32zhong
Last active June 12, 2023 04:20
Show Gist options
  • Save w32zhong/b3d8483fab16daf2038c269a869b03e2 to your computer and use it in GitHub Desktop.
Save w32zhong/b3d8483fab16daf2038c269a869b03e2 to your computer and use it in GitHub Desktop.
Use k2pdfopt copy mode for Kindle view
# Download the binary from:
#
# and chmod +x.
k2pdfopt -ui- -mode copy -x ./eqEmb.pdf
k2pdfopt -ui- -mode copy -x -p 679-707 ./d2l-zh-pytorch.pdf
# sudo pacman -S pdftk
pdftk pml1_k2opt.pdf cat 1-338 output pml1_k2opt_chap1_Foundations.pdf
rm -f *_k2opt.pdf
for f in *.pdf; do k2pdfopt -ui- -mode copy -x "$f"; done
mv *_k2opt.pdf ./k2opt/
# 每次 email 10 个 pdf,平均每个 pdf 5MB 一下就行。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment