HTML to PDF Action - NodeJS & PHP [Open Source]


Presenting HTML to PDF custom module. This extension adds to the already great set of components Wappler provided by default. Its available for both PHP and NodeJS server models.

Add HTML to PDF step in server connect from File Management category, specify an output folder path & name along with your custom HTML and the module will create a PDF from that HTML and save it.
You can then use that PDF to send as attachment via email or just store the path in DB.

Almost all options are explained using help texts. Please make sure to read them.
Here is the full source and documentation:

For NodeJS, you will have to install 1 package - Puppeteer.
This package has its own set of dependencies and might not work on a shared hosting server.

For PHP, you will have to install 1 package - mPDF using Composer.
This package is not as powerful as NodeJS’s puppeteer, ref here.

For details on how to integrate custom modules in your Wappler project, please refer the help doc here.

Feel free to reports bugs or improvements or feature requests. If you have any critical feedback we’d be happy to hear.

Team /#


This is going to be very helpful, thanks!

1 Like

I nominate you for an award @sid :slight_smile: We know the team is so so busy with “requests” … and they do their best to get everything done… its a mammoth task…

Im sure everybody that wanted a HTML to PDF solution within Wappler is grateful for your contribution. Thank you.

I think there was like Pdf generator/export 54 votes. I will also post your link in there … if you dont mind…


Thank you for the kind words.
Do let me know if you run into any issues with this module. :slight_smile:

Amazing work guys!!! Very useful


@sid do you have example of pdf produced by this extension and the html source?

And sorry for a noob question. Do I install it from terminal using NPM and that’s it or I must include the dependency into the public folder and then manually include the link from the main page.

If you clone the git, you will find both the things.

Just installing from terminal should be enough.

Thanks Sid!

1 Like

Great tool @sid, thanks for this!

I would be very interested in a tool that works the other way around and converts pdf file content to html.
Could you help me along to develop a custom module for this? Thank you very much for your help in advance!


How can I run the app on my mac? I’ve tried using node index.js on the directory after cloning but it doesn’t work

There is no special setting required to run on Mac.
It should just run like every other Wappler project.

1 Like