is it possible to convert an HTML file to pdf?
I have a ready-made HTML template form, and I have a flutter page as a form filling, I want to take the data after filling the form and compile it with the HTML template and convert it to PDF.
is it possible to do that?
what i’m doing at the moment is : filling the form in flutter app, the data saved in firebase, nodejs function take the data and compile it with html template and extract it to PDF and send it via email.
2
Answers
Although the question might be a bit broad, let’s give a simple answer.
Yes, it is.
Utilizing flutter_html_to_pdf would make it easy for you.
Example(s):
◾ HTML String:
Thus:
◾ HTML File:
◾ HTML File Path:
In your case, the file should be saved corresponding to the provided
targetPath
, therefore you can access it and send it as an email.You can use PrinceXML, it’s well documented, has samples and help you with different scenarios.