Skip to content

pdfbolt/pdfbolt-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄 PDFBolt Examples

Practical examples of generating PDFs with the PDFBolt API.

To run them you need a PDFBolt API key. Create a free account at pdfbolt.com to get one.


Invoice PDF Generator

Node.js Badge EJS Badge HTML5 Badge

This example creates an invoice PDF using Node.js, EJS templates (HTML with placeholders for dynamic content), and the PDFBolt API. You fill the template with your data and send it to the API, which returns the PDF.

Repository Structure

pdfbolt-examples/
├── invoice-pdf-generator/
│   ├── data/                 // JSON data
│   │   └── invoice-data.json // Invoice data for placeholders
│   ├── templates/            // HTML templates
│   │   └── invoice.ejs       // EJS template for the invoice
│   ├── generate-pdf.js       // Script that generates the PDF
│   └── package.json          // Project configuration

Example Output

Invoice example generated using PDFBolt API

How to Run

1. Clone the repository

git clone https://github.com/pdfbolt/pdfbolt-examples.git

2. Open the invoice generator directory

cd invoice-pdf-generator

3. Install dependencies

Make sure Node.js is installed, then run:

npm install

4. Add your API key

Open generate-pdf.js and replace the placeholder with your PDFBolt API key.

5. Run the script

node generate-pdf.js

6. View the output

The PDF is saved in the invoice-pdf-generator directory as:

invoice-<timestamp>.pdf

Full Tutorial

For a detailed walkthrough, see How to Generate Invoice PDFs with an API.


More Examples

For more PDF generation examples and tutorials, see the PDFBolt blog.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors