update code for flashcards.php, adjust layout/style of pdf generated based from template1(for the meantime)