Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pdfbolt/pdfbolt-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📄 PDFBolt Examples

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!


✨ First Example: Invoice PDF Generator

Node.js Badge EJS Badge HTML5 Badge

  • 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.

📂 Repository Structure

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

📸 Example Output

Here’s a preview of the invoice PDF you’ll generate:

Invoice example generated using PDFBolt API

🚀 How to Run the Example

1. Clone the Repository

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

2. Navigate to the Invoice Generator Directory

cd invoice-pdf-generator

3. Install Dependencies

Ensure you have Node.js installed, then run:

npm install

4. Add Your API Key

Before running the script, add your API Key:

  • Open the generate-pdf.js file.
  • Replace the placeholder with your API Key from PDFBolt.

5. Run the Script to Generate the PDF

node generate-pdf.js

6. View the Output

After running the script, the PDF will be saved in invoice-pdf-generator directory as:

invoice-<timestamp>.pdf

💡 Explore Other Examples

Stay tuned! More practical examples for PDF generation with the PDFBolt API are coming soon.

Good Luck and Happy PDFing! 🚀

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published