21 16
Contact Author Sign in to rate

Papercards - export & print flashcards to paper

0.01MB. Updated 2021-05-14. Only supports Anki 2.1.x.

Description

What is Papercards? Papercards is an exporter for your cards. It saves the cards to HTML or PDF and then you can print them on paper. Quick Start
  1. Install the plugin
  2. Restart Anki
  3. Go to a carddeck, which should be exported
  4. Select Tools->Export to papercards
  5. Print the exported file.
Requirements Configuration
  1. Open Anki's menu Tools->Add-ons
  2. Select Add-on Papercards
  3. Click on Config button on the right side
  4. Read and scroll through the infobox at the top part for available options
  5. Change the desired JSON value.
Issues Cannot find command wkhtmltopdf Please use the review section only for feedback. I cannot give you any response here. Issues can be reported in this form

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

2042118948

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author

Reviews

on 1630329617
I tested the plugin with Anki 2.1.44 with cards that uses images and MathJax for both HTML and pdf. Here are the comments when i run under Ubuntu 20.04 LTS:
- Good results with both HTML and PDF
- Be careful to add the package 'mhchem' in the "Tools|Manage Note Types" options to render MathJax Chemistry formulas enclosed in [latex]...[/latex] tags of Anki fields (ex \usepackage{amssymb,amsmath, mhchem} for the note type you re using). I also note checking the "Create scalable images with dvisvgm" checkbox gives better results.

When i run under Window$ 10:

- Good results with HTML, applying the same settings as Linux distro for MathJax Chemistry
- PDF doesn't work for me. The problem seems to be located in the "wkhtmltopdf" utility. Indeed running it manually in the command line with the same parameters as those in the code of the plugin revealed the same conversion problem (overlap of columns, and column content). Hope for W$ users this issue can be examined.

Bugs i found:

- svg base64 encoded images in the plugin do not displays in the browser with html generated papercards.

To fix this, just add the following lines in the "def replace_image_source()" of "Papercard.py" after line 160 :

if ext == 'svg':
ext = 'svg+xml'

I also noted a great improvement of the quality of papercards with this modification

Note: I also found that sometimes characters are cropped above and below when rendered with MathJax Chemistry. However this is not a bug of the papercard add-on. Indeed the issue also appears in the card preview of Anki. Read more in my comment (dated 2021-08-30 for the related add-on "937148547 Edit LaTex build process" ) about the "--exact-bbox" parameter of dvisvgm to remediate this issue.
on 1629298738
PDF: the content of all cards is in the 1st column although 4 columns were asked. The workaround of putting 1 row and 1 column will just use tons of paper --> useless
HTML: Chemistry is displayed as code, not formula --> useless
Never got an answer.
on 1629049526
Guys!!!

If it is not working for you then do this

*****Change papercard config******

"cardsPerCol": 1,
"cardsPerRow": 1,
"format": "A4",
"orientation": "portrait"

*****Open Html in firefox*****

use firefox reader mode (Ctrl+Alt+R) to simplify text

*******Ctrl+P******

*Use Paper A5
*Scale "78" or your own preferred zoom
*margins
Custom
TOP: 0.5 , BOTTOM : 0.5
RIGHT: 0.0 ,LEFT: 0.0
and voila, there you have it
perfect print
on 1627915051
Seems to work fine, with both pictures and text.

For the average user;
It seems that if you reduce the number of cards per page (2 for example), the text will be shown more as a whole.
It also seems to work best with less information flashcards; i.e. less text in both question and answer. This is valid since flashcards works better when in high amounts rather than being long books.

However, as feedback for the creator;
Personally I would've liked if there was some way of making sure that text is not cut off due to the formatting.
As flashcards goes, I'm more interested in having the questions and text as a readable, printable source material rather than flashcards itself since anki is already more than capable of delivering it.
on 1627046948
Does not work
on 1624537976
Perfect with html.
If you have pictures that don't fit, delete all the "height: 100%;" commands in the style section of the page, but keep the "max-height: 100%;" as a style command for "img".
on 1621864133
My cards contain often up to 7 enumerations which are cut-off on the HTML cards
Also images are cut-off on the HTML cards making the cards useless
The PDF export writes everything multiple times over the same card.

I am using the Image Occlusion and Cloze Overlapping plugins.
on 1616939672
Doesn't really work if you have images. They end up being all over the place.
on 1615637703
Thanks!!
on 1615503547
Works fine in general.
Just a little feedback. I think it would be good to also insert an option to add some CSS style using the config file, because then it would be possible to adjust the size of images (also images should in general be resized to max-width of the page's width).
Another thing that would be great would be an option that disables the "newpage" divs inside the HTML so the cards are just put out without a pagebreak (maybe even without the "front side" <-> "back side" manner of writing it into the HTML file), because I didn't really need the PDF to study with the cards but rather as an overview over my noted down questions and answers.

Apart from that, great tool!
on 1614643233
It does not work. There is no option to convert the card to PDF.
on 1610754718
In principal a great idea. Id love for this to work for cards with pictures, but as it stands right now its almost unusable once there are pictures involved.
on 1610559680
Cards with images and prints become a total mess. I was hoping it would just put one thing below the other. But it probably works for simpler decks.
on 1608542768
Error message 'Cannot find command wkhtmltopdf'
on 1608220550
The pictures of the flashcards overlap eachother and obscure the information on the next flashcard.
Requires more development to superimpose the images to fit in their designated space and not overlap the other flashcard's space on the table.
It is so close to being perfect in terms of its purpose and function but this issue is detrimental and needs addressing as soon as possible.
on 1605475712
The intention seems great since it takes both the front side and the back side of the cards and place it taking in count the rows and columns specified.
It also place it in mirror for recto and verso.
But this add-on does not manage correctly the images since it does not resize it to match the dimensions of a table cell. So images are truncated.
Most of all on one face, images are centered whereas on the other face their are left-align.
It's a pitty because I'm sure this add-on just lacks a bit more devlopement to be absolutely great. Thanks to the developer.
on 1605349438
OMG thank you very much
on 1605319209
Funciona de maravilla, muy buen aporte muchas gracias
on 1602213654
If you format 1 for each setting instead of 4, it actually works alright but nothing perfect
on 1600868872
perfect
on 1586828094
Great work!!! very helpful!!!
It will be great if I can config the fields. For example, sometimes I just want to export the questions with no answers.
on 1583354674
Works!
on 1581289442
I want to export my flashcards to paper and I do not understand the process. It is very difficult :(
Where can I download papercards?
on 1579100170
whoa
on 1578413686
Very good addon ! It helps a lot to review the whole lesson at the end of the year.

Since I had lots of pictures the initial settings didn't work for me and I had to change the "cards per row" to 1 so that I could see all the pictures properly. (not on top of the text of the other cards)

I didn't need all the "front" of the cards and I didn't find how to remove them, so I changed "cards per col" to 200 so that they all appeared at the top of my pdf and I only used the second half of the pdf. If anyone knows how to delete the "front" part of the cards from the export, I'd be interested :)
on 1576092069
I think it is necessary to install pyqt5 library for PDF creation to work. Nevertheless, I found some images are cropped in my cards.
on 1574874632
Add this code to <head> to enable mathjax

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
on 1573234194
Some MathJax blocks are not rendered in the output.
on 1567922837
It is not working
on 1566131291
错误
有一个错误发生了.请在按住shift键的同时启动Anki,这样可以临时的忽略掉你已经安装的插件。
如果仅仅是因为插件引起的问题,请选择工具>插件菜单项来将出错的的插件设置成失效,然后重启Anki,重复以上的步骤直到你发现了具体是哪个插件引起的问题。
当你已经发现是因为插件引起的问题,请在我们的支持网站上 add-ons section 上报告问题。
调试信息
Anki 2.1.13 (3ba55990) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
File "C:\Users\flity\AppData\Roaming\Anki2\addons21\2042118948\main.py", line 36, in export_papercards
papercard.export_paper(deck, cards)
File "C:\Users\flity\AppData\Roaming\Anki2\addons21\2042118948\Papercard.py", line 291, in export_paper
htmlfile, pdffile = self.generate_paper(deckname, cards)
File "C:\Users\flity\AppData\Roaming\Anki2\addons21\2042118948\Papercard.py", line 276, in generate_paper
pdffile = self.generate_pdf(htmlfile)
File "C:\Users\flity\AppData\Roaming\Anki2\addons21\2042118948\Papercard.py", line 260, in generate_pdf
cmd = [self.get_wkhtmltopdf_cmd()]
File "C:\Users\flity\AppData\Roaming\Anki2\addons21\2042118948\Papercard.py", line 219, in get_wkhtmltopdf_cmd
which = subprocess.run(['where', 'wkhtmltopdf'], encoding='utf8', capture_output=True)
File "subprocess.py", line 403, in run
<class 'TypeError'>: __init__() got an unexpected keyword argument 'capture_output'
on 1562095257
Works fine with HTML
on 1560707551
Some questions didnt even have their answers. Didnt work.
on 1556985947
cant find wkhtmltoppdf
on 1549123596
It works and looks good but generating of pdf takes a too long time.
on 1540055890
I keep getting a message saying " not enough argument for format string".
on 1537888205
Exactly what I wanted, a simple overview of a chosen card deck
on 1537009952
Useful, but work only with HTML