anki-pdf converts anki-decks to PDF files.
- Chose fields from your anki-cards and format them individually
- Front and back sides of the cards can be configured and formatted
- Supports image embedding
- Different strategies for overflowing text
go get https://github.com/fbngrm/anki-pdf
Binaries will be located in the anki-pdf/bin
directory. Builds use the latest commit hash of the master branch or tag.
cd anki-pdf
make build
./bin/anki-pdf --version
Install the program in your $GOPATH.
cd anki-pdf
make install
anki-pdf --version
Two input files are required to generate a PDF file.
- A JSON representation of your anki-deck, generated with CrowdAnki
- A YAML configuration file which tells teh program how to render the PDF.
Follow the export instructions to create the JSON file.
The example/
directory contains configuration files which should be used as a starting point.
anki-pdf -c path/to/anki-deck.yaml -a path/to/anki-deck.json -f path/to/fonts [-m path/to/media]
To add new fonts, follow the instructions of gofpdf.
If you use UFT-8 encoded text, set utf8: true
in the configuration file of the anki-deck.
Before the program terminates, an error report will be printed. To optimize the formatting and reduce overflow errors, adjust the configuration for the overflowing fields or chose a different error handling strategy.