This README provides instructions on how to generate reports using Highcharts and PDF through a Node.js server. The server accepts JSON data via a POST request, generates charts using Highcharts, converts them to base64-encoded PNG images, and then includes these images in a PDF document.
- Node.js installed on your machine.
- Postman or a similar tool to make HTTP requests.
-
Clone the Repository
git clone <repository-url> cd <repository-directory>
-
Install Dependencies
npm install
-
Run the Server
npm start
The server will start and run at http://localhost:3000.
-
Open Postman
-
Create a New POST Request
- Set the request type to POST.
- Set the URL to http://localhost:3000/generateMIReport.
- Set the Request Body
- Select the Body tab.
- Choose raw.
- Paste the json in the sample-request file
- Send the Request
- Click the Send button to make the POST request.
- The server will process the request, generate the charts, and return a PDF document with the charts included.
By following these steps, you will be able to generate reports using Highcharts and PDF through a Node.js server. Use Postman to send the JSON data and receive a PDF document with the generated charts.