Of course it is possible. How do you think those two sites you showed do it if it is impossible?
Need to warn you that if you print anything FROM THE BROWSER, then the browser is going to put its own header and footer and page number and other stuff on the page. That can all be suppressed, but you would have to give your users *VERY* detailed instructions on how to do so and how to restore the browser to normal afterwards.
So I hope you can live with the gobbledy-gook added by the browser.
You alternative is to send the info from the flash cards back to the server and then have the server create PDF files. The user would then download the PDF and print from it.
If you are going to be saving the flash cards in a database, you'll need to send them to the server, anyway, so this may make sense.
You can do it all with HTML and a <form> and then the appropriate server-side (PHP/ASP/JSP) processing of the form fields.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.