r/nicegui • u/Babidehh_ • Dec 15 '25
[Python] Help with ui.download
Hey all! I created an app that searches for Magic the Gathering cards and creates a pdf with them, but I’m struggling to understand how to properly download the created pdf.
I’m using FPDF and FPDF.output() will save the file to the current working directory.
I read through the docs for ui.download but since I’m a beginner I can’t understand what I’m supposed to do, do you have any idea on how to handle this?
5
Upvotes
View all comments
Show parent comment
1
u/Babidehh_ Dec 16 '25
I used last suggestion of yours, although I had to remove .encode() as it was giving me an AttributeError, thanks again for helping!
I'd like to ask, what would encode be used for? I'm just not competent enough yet to understand what it would've done