I would like to retrieve the entire content of an HTML file in a variable, how can I do this
thanks all
I would like to retrieve the entire content of an HTML file in a variable, how can I do this
thanks all
Can you explain in a bit more detail what you are trying to do? Maybe there is a better way.
I am looking to create an html page with data from a database, then I will convert it from the html to PDF module.
Thank you
Hi Kryo,
Which HTML to PDF are you using?
There is:
OR
Cheers
Michael
thanks
Wappler does not have a read file component yet.
So you will probably have to either create a custom module of your own to read a file into a variable.
Or, you can change the approach and go with the way Michael is using HTML to PDF as linked above.
this version ?
I don’t use nodejs
Yeah, that’s my module. Unfortunately, I haven’t touched since my Wordpress days and mainly work with JS now, so I don’t have a PHP style version for my version.
If you’re comfortable to create your own module, there’s plenty of documentation here - plus you get the benefit of customising it to the way you need.
Sorry I can’t help mate.
Cheers
Michael
Anyway, thank you for your time.
In the custom module, you can pass the file path in HTML input, and then in the custom module’s JS file, write some PHP code to read the HTML file and pass to mPDF.
I just got around the problem