68 17

# Basic Printing Support

<10kB. Updated 2020-02-24.
The author has shared 13 other item(s).

## Description

Supported Anki versions:
• 2.1.0-2.1.19 (updated 2017-08-28)
• 2.1.20+ (updated 2020-02-24)

1025789669

## Reviews

on 1633878276
the print it not to scale. it will not print to page margin
on 1629488174
it does work but it prints the front and back on one single flashcard which makes the flashcard a lot less efficient for active recall. Don't bother downloading this.
on 1625054030
does not do the job needed to .. which is question at back and answer at front .. or vice versa .. it just prints everything on one card .. and about 9 card on one paper
on 1624294353
Pretty good, but I wish it had more options like only showing cloze-type notes once, rather than having them repeat for each card.
Once you export the print file though, you can simply use HTML editing to reformat, but its kind of tedious.
on 1620653920
Good, but it'll be better if we can print some specific cards, like that I studied only today.
on 1616525187
Thanks
on 1615707273
Thank you so much!
Simple and elegant.
I printed a 3,000-item deck with different note types in the mix, and that has no images, and it looks great.
on 1614849393
Looks really good and works with Anki 2.3x. The problem is that if you print then you are going to need all of the cards the same size. When I wanted to print the page loaded without problems. It loaded 3500+ cards of all different sizes unfortunately. I imagine this is due to this being a very basic add on, it only renders well if the card is a basic card. I haven't tried basic cards and it may be possible that, depending on the length of the answer, the cards might also expand and shrink for printing. Great add-on, just too basic.
on 1614747674
on 1614640622
Worked perfect on the first try
on 1614326418
Very nice!
But I would like to ask if it is possible that it can be limited to showing one card per page (having a new page after each card)?
Thank you!
on 1614079937
Works brilliantly! Thanks!
on 1612009024
Great!! Thank you
on 1607822478
This works great! I was able to render LaTeX formulas by pasting this into the browser console:

var script = document.createElement("script");
script.src = src;
document.body.appendChild(script);
}

on 1605955755
Really good, but it would be great if there where more possibles to custumize the output. For example, linesize and color of the box, Backgroundcolor of the hole page and Backgroundcolor of the box.
on 1605473594
Great!
on 1605286902
does what it says on the tin
doesn't display LATEX or clozure, but images worked for me (no image addons)
on 1604680470
Does anyone know how to get the images to not appear as [?] ???
on 1604569949
good!
on 1603101330
It works. It also supports Unicode.
Version 2.0.32
on 1594285577
Superb! Better than other addons for printing. Highly recommended.
on 1591284404
The only thing that I miss, is that it doesn't work properly with Image occlusion Enhanced. If anyone has a solution, write that down here please!
on 1588946822
can someone tell me how to change alignment from center to left? simple but effective app!
on 1585293422
It works!
on 1584010012
Does not work
on 1583418104
Incompatible with cloze deletion or image occlusion
on 1583339614
I follow the steps, it worked. Thanks!
on 1582590694
I hope it supoort more cutomized option for layout.
now it only support card per row.

sometimes i want it just one card per a page.

on 1582576786
✅ Update 24.02.2020: Damien fixed it now. Thanks! ✅

༼ つ ◕_◕ ༽つ 🆘 Fix for Anki 2.1.20: 🆘

1. Open the "__init__.py"-file of this addon in a text editor. You can find this file by clicking on Extras > Addons, selecting "Basic Printing Support" in the list on the left and clicking the "Show Files"-button on the right.

2. Go to Line 57. It says: qatxt = c._getQA(True, False)['a']

3. Replace this with: qatxt = c.css() + c.render_output().answer_text

4. Save the changes to this file.

5. Restart Anki.

Voila! Printing works again.
on 1581249585
simply does not work!
on 1576706883
Thank You
on 1573234244
For those who are new to installing add-ons: restart Anki, the menu item won't show up until you do.
For some reason some of my MathJax formulas do not get rendered in the output. Otherwise looks good.
on 1569342929
So useful, thanks!
on 1563335066
Just save
on 1558025570
OK
on 1556698638
Very useful and easy to use. Sometimes I need a PDF file just to review my cards.
on 1556411806
thank you so much. works great for me with some additional tweaks
on 1552899725
It really work.help me a lot!!!Thank u!!!
on 1544265655
Thank you. Everything works!)
on 1542145351
Reasonably good hack (almost does what I want it to do) but... it's definitely _basic_ support. Problems include:

* It only prints the back side of the cards, meaning that (e.g.) cloze deletion cards do not properly function.
* They're in a fixed grid, meaning you can't (for example) print the cards on different-sized paper or have the individual cards have a different width. (Possible to partially fix: you could use Anki's new add-on configuration system to pick values for the CONSTANTS, allowing the user to change the cards-per-width.)
* Printing multiple times overwrites the previous printouts. (Possible to fix: use a temporary file or simply write to "path/print"+repr(time.now())+".html", or perhaps prompt the user for where to save.)
* CSS is discarded. (Could be fixed using Shadow DOMs, but that's a really complicated feature.)
* Key combination Ctrl + P clashes with Preferences, rendering neither operable. (Possible to fix: choose something else, like Ctrl + Shift + P, or at least disable the key combination.)

But it does what I need it to (almost) and that's good enough for me until I have time to make an "Advanced Printing Support" addon.
on 1541787203
+1
on 1539790172
lovely, allows me to drag my anki decks into onenote for extra mischief.

you complete me.
on 1538987930
doesn`t work
on 1536143148
To get the cards in order you created them, go to the addons window, click "open folder", open __init__.py, go to line 24 and in the triple """, replace 'sort by n.sfld' by 'sort by c.id'
on 1535918671
Works fine!
on 1527984000
it worked for me
on 1518652800
Can somebody please explain how to install this printing add-on on Mac computer?
on 1517788800
Perfect, much needed. I was able to replace OneNote with flashcards because of this.
on 1505433600
Not appearing on Safari Browser Anymore

The print option was working fine, but now when I try this add-on the lightbulb appears on the bottom left corner of Anki, but my browser never opens a new tab for printing my cards. Please help! It was working well before, and now it just doesn't work for me
on 1500249600
Updating Print Settings for cleaner printing

To stop printing from cutting off tables in mid-row and to make the columns a consistent width you can edit this plugin and replace the following lines.

REPLACE:
tr { page-break-after:auto; }
WITH:
tr { page-break-inside:avoid; page-break-after:auto }

REPLACE:
cont = u"<td><center>%s</center></td>" % esc(c._getQA(True, False)['a'])
WITH:
cont = u'<td width="{1}%"><center>{0}</center></td>'.format(esc(c._getQA(True, False)['a']), 100/CARDS_PER_ROW)
on 1498003200
HowTo get Pictures into MS Word

1) Open print.html in Internet Explorer
2) File->Save As "Webpage" under new name (Internet Explorer will create a html file and a folder containing the pictures
3) Open saved .html-file in Chrome
4) CTRL+A -> CTRL+C into Word.
( 5) In Word get rid of the tables and replace them with paragraph marks)
on 1497916800
Still works OK

This is very basic, but it works.

As other reviewers mention, it would be great if it auto-loaded the exported html page in a browser.
on 1491523200

Generating the print.html works for me but some points:

1. It opens to C:\Users\xxxxx\AppData\Roaming\Anki2\addons and not to the documents folder.
2. It does not open the print.html in the browser.
on 1491177600
Does spawn brower, does not generate output file for printing, pretty shoddy

on 1488412800
print option

money. works fast. can convert from webpage to PDF and print away. sweet!
on 1487116800
Doesn't output to webpage

When I select the deck and then use the add-on, it tells me it is working, but doesn't ever output to a webpage for viewing and printing.

I'm running windows 10 and Anki Version 2.0.41, thoughts? I would really like to see this work.
on 1484611200
great support

highly recommended

[url=http://www.hello.com]hello[/url]
http://www.hello.com
<a href="http://www.hello.com">hello</a>

[url="http://www.hello.com"]hello[/url]
on 1473292800
Please fix page breaks and dramatic variations in card height

Great add-on, but definitely needs some fixing
on 1473206400
Page breaks destroy the experience

Hi, thanks for this addon. I really like it and think it's great.

Unfortunately I have 2 big problems with it:
1. the flash cards I want to print are different in hight because of different amount of text on it. So they won't fit on a page without the half of one card continuing on the next... I didn't find a way to fix that in the Browser, yet.

2. to fix the problem from 1. I tried to open the print.html in excel and set the print margins for each row manually. But Latex Formulas weren't imported into excel. This makes it very impractial for my purposes :/ (running Mac OSX)

Any Ideas?
on 1456358400
this is how you can modify the script so that it will open the Browser Windows

for me it didn't open the browser window.
I managed to resolve it by editing one line in the script (Tools --> Add-ons --> Basic_Printing_Support --> Edit..

replace "openLink(upath(path))" with "QDesktopServices.openUrl(QUrl.fromEncoded(upath(path)))" and then restart anki and print. It works for me
on 1448496000
Thank you Thank you Thank you!

It automatically opened in Chrome on my Mac and then I copied the cards into Word :)
on 1446768000
Niektóre tale dobrze zamienia na nadające się do druku (głównie słówka). Jeżeli chodzi o rozbudowane talie, ze zdjęciami, kilkoma elementami, występują problemy. U mnie brakuje widoku przedniej strony fiszki w wydruku.
on 1439856000
brilliant app

works perfectly for me... when the output file first opened automatically in firefox i wasn't really satisfied as the characters were tiny and about 100000 cards were crammed into one page, but opening it in safari did the trick for me. also i tried word, but unfortunately no pictures were displayed there.
on 1432684800
has problem

add-on changes the order of words.
all the flashcards are not the same (Length and width).
on 1423440000
Genius!

Works perfectly, a little slow but awesome, thanks!
on 1412380800

Works as it says on the box. Thanks heaps.

Would love a way to select less than a whole deck, i.e. export to the print file just tag=something.

Thanks.
on 1409961600
Very useful

Very useful.

Thank you very much :)
on 1403827200
Change print order

Currently the cards are sorted in alphabetical order. Is it possible to add settings to print in order of date created? Or in the card order?
on 1401840000
WORKS, but does not open the browser automatically.

All of you who are saying this add-on does not work: it does. It just doesn't open the browser automatically.

Here's how to do it (Windows):