Export flashcards with formatting

Hi everyone. I use Anki a lot. Even though I understand the science behind the SRS, I enjoy reading my material as if it was a textbook. I also use Quizlet and the platform allows me to print my flashcards as pdf, including the edition I do (bold/italic/underline). Is there a similar tool for Anki? I would like to save my decks as pdf files. I know I can export to txt, but all the formatting goes away when I do it. Does anybody know? Thank you

2 Likes

One way to do this would be to do it the other way around, that is, write your Anki note in an format that allows both exporting to Anki and to a pretty human-readable format. I know this is possible with org mode (which allows exporting to pretty much any format known by mankind) alongside to anki-editor.

There is a “beginner” tutorial here. I doubly-quoted beginner because it assumes you have familiarity with Emacs, and in the (most likely) case in which you don’t you should also take an Emacs tutorial. Beware that, even though it is possible to achieve what you are looking for this way, it might not be the easiest way.

1 Like

You can use the Basic Printing Support to export the cards as HTML webpages, which you can then open in your browser, view and save them as PDF.

3 Likes

Thank you guys for the help! Basic Printing support is exactly what I need. Thank you! :smiley:

Hi, abdo! I’m enjoying “Basic Printing Support”, but when it creates the page where I’m going to download the pdf, the printing leaves content out of the pdf (check the page). Do you know a way to fix this problem? Thank you!

Can you export a sample note and upload it somewhere so I can test it? Select a note in the editor and click Notes > Export Notes. Then upload it to some service like https://gofile.io/

Hey abdo! I uploaded the deck, but This forum doesn’t allow me to send links in the reply. Is there another way to send you? Thank you!

This is a restriction that applies to new users.

I think you can paste the link if you use the Preformatted text option in the forums editor.

1 Like

Hey, abdo! Here it is. Let me know if I need to do any other thing. Thank you! The link is gofile io /d/2BC5W8

Is this a cloze card? The card I found in the collection you sent is a cloze card but it has no clozes so Anki displays an error (and the add-on prints “pagefuls” of this error).

If I convert the card to a basic card to print its contents, I get this and the cards show correctly with no cropping.

Maybe this has something to do with your PDF viewer. Is this screenshot from your PDF viewer? Does the card display correctly in the browser?

Hey abdo! It shouldn’t have been the cloze card deck. I send you again, it is gofile io /d/zQVURt . If you can see the cards with no cropping, it might be a problem in the pdf viewer. Would you please try converting this new deck and let me know? Thank you! Oh, btw, the screenshot is from the browser, but when I download, the problem remains

The card appears with no cropping in browsers (tested with Firefox, Chrome, and Edge) and Adobe Acrobat Reader. In the browser, the cards may not fit into the screen and you may have to scroll horizontally to see them, while they are fitted into the page with no need to scroll in the PDF.

Thank you, abdo! I have to find out what is going on, I still get cropped cards when I download the pdf file. Thanks for the help!

If I have understood well, given the same starting cards, abdo is able to convert them to pdf but not advgdias, right? Could you please send the resulting pdf that you get from the conversion, to figure out whether the problem is in the pdf creation step or in the pdf rendering step.

Hi, Blackbeans! I uploaded the file here: gofile io/d/UiodJP
Thanks for taking your time!

I confirm that the generated pdf is indeed cropped. However, I just understood that the add-on does not actually produce a pdf, but an html page. You convert the latter to the former on your own, and it’s probably at this step that there is an issue. I don’t know what you use to convert files, but I would suggest to use pandoc, as it’s free, reliable and supports a ton of formats:


Besides that, it’s very easy to use because it has a lot of examples on how to convert from something to something.

Keep in mind that pandoc relies on at least one TeX engine to produce pdf documents, so be sure to have one installed. Everything is detailed in the “installation” section of the pandoc website.

Every modern web browser has an option to print pages to PDF. I converted the page using Firefox and the resulting file has no cropping.

@advgdias did you use your browser’s print function to convert the file to PDF? If not, what tool did you use?

Ye, I used my browser (Chrome) to convert to pdf. Is there another way to do it?

This is not a reliably way to convert html pages to pdfs. It goes well for a quick and dirty conversion, but:

  • it happens that the produced result is not exactly what you expected. I have personally experienced several conversion that failed (with ff), in the sense that the resulting pdf is not what I expected it to be;
  • it cannot be automated, because starting a web browser for such a task is both overkill and superslow.

Considering there is a dedicated software, I don’t see the point of continuing using a web browser for converting html to pdf (unless you only want, again, a quick and dirty solution). Btw, the problem was indeed caused by a conversion performed by a web browser…

See my previous post.

@BlackBeans @abdo thank for all the help, I guess I will be able to find the solution.