In this article we will show you how to generate PDF invoices on the web server side. We use this approach to generate and email billing reminders to our customers.
1. Download NodeJS to the web server. For Windows choose 64-bit MSI installer.
2. Run and install keeping all default settings.
3. Inside your project create a new folder named pdfmake.
4. Proceed to that folder, start the command line and run:
5. This will create index.js, in this file we will add the code that create PDF file. In our case, we will be generating due invoices for our cliens.
Here is the index.js file we that generates invoices.
6. Now we are ready to create PDF files. Here is how you execute it from PHP code:
And the same for C#: