I have searched some method to convert my local html files to pdf file in python.
What I searched was pdfkit
, weasyprint
, xhtml2pdf
, pdfcrowd
.
The problem is, I should make this as an exe file with Pyinstaller to give someone else so that they can work with this program. And I encountered an OSerror
with pdfkit
which is saying:
OSError: No wkhtmltopdf executable found: "b''"
And I found the solution that I have to edit some environment variables for that. Weasyprint also need to download/install other things.
I don't think those will work in other PC since they need some external treatment to run the program.
xhtml2pdf
seems be the one which convert html from the webpage(not the local file) to pdf, and pdfcrowd
is my least option for now since I have to pay to use the API.
Do you have any recommendations for converting those with my circumstances?