Welcome to the PDFBolt Examples Repository!
Here, you’ll find practical examples demonstrating how to generate high-quality PDFs effortlessly using the PDFBolt API.
Each example is designed to be ready-to-use — just clone the repository, follow the included steps, and see how easily you can create professional PDFs.
🔑 To run these examples, you’ll need an API Key from PDFBolt. Create a free account at PDFBolt to get started!
- The Invoice PDF Generator demonstrates how to create a professional, dynamic invoice PDF using Node.js, EJS templates (HTML with placeholders for dynamic content), and the PDFBolt API.
- This approach allows you to seamlessly transform HTML templates into polished PDFs filled with custom data.
pdfbolt-examples/
├── invoice-pdf-generator/
│ ├── data/ // Directory for JSON data
│ │ └── invoice-data.json // Invoice data for placeholders
│ ├── templates/ // Directory for HTML templates
│ │ └── invoice.ejs // EJS template for the invoice
│ ├── generate-pdf.js // Main script for PDF generation
│ └── package.json // Project configuration
Here’s a preview of the invoice PDF you’ll generate:
git clone https://github.com/pdfbolt/pdfbolt-examples.git
cd invoice-pdf-generator
Ensure you have Node.js installed, then run:
npm install
Before running the script, add your API Key:
- Open the
generate-pdf.jsfile. - Replace the placeholder with your API Key from PDFBolt.
node generate-pdf.js
After running the script, the PDF will be saved in invoice-pdf-generator directory as:
invoice-<timestamp>.pdf
Stay tuned! More practical examples for PDF generation with the PDFBolt API are coming soon.
Good Luck and Happy PDFing! 🚀
