Hi everyone,
I would like to make a interface that the user can read the content inside the pdf file or word file through Anvil interface, after the file has been uploaded.
But I don’t know how to code it out since I am still beginner of Python language. Please give me some idea and suggested code for a reference. Thank you very much.
You would need to pull in the PDF or Doc file into a server module, where you could then parse it with a library. Here is a link to the list of packages available on the server modules. https://anvil.works/docs/server/packages
If a package you need is missing you can request it to be installed. Note: not all packages are available on the free tier.
For PDF’s PyPDF2 is available. You can find the PyPI page here. For Doc files I don’t know but I’m sure there are numerous packages out there if one is not already installed.