Skip to content

Instantly share code, notes, and snippets.

@sawa2d2
Last active December 8, 2022 19:24
Show Gist options
  • Select an option

  • Save sawa2d2/d3f2517f6decb2c2583020442ba71ecd to your computer and use it in GitHub Desktop.

Select an option

Save sawa2d2/d3f2517f6decb2c2583020442ba71ecd to your computer and use it in GitHub Desktop.
How to upload/download pdf to Kindle Cloud

How to upload/download pdf to Kindle Cloud

Note: This article is only for amazon.co.jp.

How to upload a book

Upload your pdf via Send to Kindle (https://www.amazon.co.jp/sendtokindle) app.

How to remove a book

Remove an item listed in personal documents.

[optional] How to compress pdf files

pdf files to upload must be <=50MB.

Using the following script helps you compress easier.

(Install ghostscript in advance)

$ brew install ghostscript

Create the folowing script as pdfmin.

#!/bin/sh
# Usage:
#   $ pdfmin [file...]

cnt=0
for i in $@; do
  gs -sDEVICE=pdfwrite \
    -dCompatibilityLevel=1.4 \
    -dPDFSETTINGS=/ebook \
    -dNOPAUSE -dQUIET -dBATCH \
    -sOutputFile=${i%%.*}.min.pdf ${i} &
  (( (cnt += 1) % 4 == 0 )) && wait
done

(Reffered to this article PDF をコマンドラインから圧縮する - Qiita)

Execute $ pdfmin foo.pdf then foo.min.pdf will be generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment