Overview

CraftMyPDF offers a platform for programmatic PDF generation, designed to automate the creation of documents from structured data. The service provides a RESTful API that accepts JSON data and an HTML/CSS template to render a PDF document. This approach separates document design from data population, allowing for dynamic content generation without manual intervention.

The core components of CraftMyPDF include its PDF Generation API and a visual document editor. The editor enables users to design PDF templates using a drag-and-drop interface and standard web technologies (HTML, CSS), which can then be populated with dynamic data via API requests. This facilitates use cases such as automated report generation, invoice creation, and the issuance of certificates or tickets.

Developers can integrate CraftMyPDF into their applications using various SDKs, including Node.js, Python, PHP, Ruby, Java, and Go. The API is designed to be language-agnostic, accepting JSON payloads and returning PDF files or URLs to generated documents. This flexibility supports a range of development environments and application architectures.

CraftMyPDF is suitable for businesses that require high volumes of customized documents, such as e-commerce platforms generating order confirmations, financial services issuing statements, or educational institutions providing diplomas. The platform handles the rendering process, abstracting away the complexities of browser-based PDF conversion or server-side rendering engines. Its focus on template-based generation with dynamic data injection positions it for scenarios where consistent document formatting is required across variable content.

The service also addresses compliance requirements like GDPR, which is relevant for organizations operating within the European Union or handling EU citizen data. The visual editor aims to reduce the development cycle for document design, allowing non-technical users to contribute to template creation while developers focus on API integration and data orchestration. This separation of concerns can streamline workflows for document-intensive applications. For example, the W3C's CSS Paged Media Module provides a foundational understanding of how web technologies can be adapted for print layouts, which is a principle applied in services like CraftMyPDF for converting HTML/CSS to PDF.

Key features

  • PDF Generation API: Programmatic creation of PDF documents from HTML/CSS templates and JSON data via a RESTful interface.
  • Visual Document Editor: Online drag-and-drop editor for designing and managing PDF templates without writing code directly.
  • Multiple SDKs: Official client libraries for Node.js, Python, PHP, Ruby, Java, and Go to simplify API integration.
  • Dynamic Data Injection: Supports populating templates with variable data from application databases or external sources.
  • Template Management: Tools for organizing, versioning, and reusing document templates across different projects.
  • Webhooks: Configurable callbacks to notify applications upon document generation completion or status changes.
  • GDPR Compliance: Adherence to data protection regulations for handling user information.

Pricing

CraftMyPDF offers a free developer plan and tiered paid subscriptions based on the number of PDFs generated per month. All paid plans include access to the API, visual editor, and support.

Plan Monthly PDFs Price (USD/month) Features
Developer Plan 50 Free API Access, Visual Editor, Basic Support
Starter Plan 1,000 $29 All Developer Plan features + Priority Support
Business Plan 5,000 $99 All Starter Plan features + Advanced Analytics
Professional Plan 20,000 $299 All Business Plan features + Dedicated Account Manager
Enterprise Plan Custom Contact Sales Custom PDF volumes, SLA, On-premise options

Pricing data current as of 2026-05-28. For the most current information, refer to the official pricing page.

Common integrations

  • Web Applications: Integrate with custom web applications built with frameworks like React, Angular, or Vue.js for dynamic report or invoice generation.
  • Backend Services: Connect with backend services written in Node.js, Python, Java, or Go to automate document creation workflows.
  • CRM Systems: Generate customized quotes, contracts, or client reports directly from CRM platforms like Salesforce.
  • ERP Systems: Automate the creation of purchase orders, shipping labels, and financial statements from ERP solutions.
  • E-commerce Platforms: Generate order confirmations, shipping labels, and return forms for online stores.
  • Workflow Automation Tools: Integrate with platforms like Tray.io or Zapier for no-code/low-code automation of document generation tasks.

Alternatives

  • DocRaptor: A cloud-based HTML to PDF API focused on high-fidelity conversions and print-quality documents.
  • SelectPdf: Offers a .NET library and REST API for HTML to PDF conversion, supporting various web technologies.
  • PDFMonkey: Provides an API for generating PDFs from HTML templates, with a focus on ease of use and developer experience.

Getting started

This example demonstrates how to generate a simple PDF using the CraftMyPDF Node.js SDK. First, ensure you have Node.js and npm installed. Install the CraftMyPDF SDK:

npm install craftmypdf --save

Then, create a JavaScript file (e.g., generatePdf.js) and add the following code. Replace YOUR_API_KEY with your actual CraftMyPDF API key and YOUR_TEMPLATE_UUID with the UUID of your desired template.

const CraftMyPDF = require('craftmypdf');
const fs = require('fs');

// Initialize the CraftMyPDF client with your API key
const client = new CraftMyPDF.Client('YOUR_API_KEY');

// Define the data to be injected into the template
const data = {
  "title": "Invoice #12345",
  "customerName": "John Doe",
  "items": [
    { "description": "Product A", "quantity": 2, "price": 10.00 },
    { "description": "Product B", "quantity": 1, "price": 25.50 }
  ],
  "total": 45.50
};

// Specify your template UUID
const templateUuid = 'YOUR_TEMPLATE_UUID'; // e.g., 'a1b2c3d4-e5f6-7890-1234-567890abcdef'

client.generatePdf(templateUuid, data, {
  // Optional: outputType can be 'download' (default) or 'url'
  // outputType: 'url'
})
.then(response => {
  if (response.type === 'Buffer') {
    // If outputType is 'download' (default), response is a Buffer
    fs.writeFileSync('invoice.pdf', response);
    console.log('PDF generated and saved as invoice.pdf');
  } else if (response.url) {
    // If outputType is 'url', response contains a URL
    console.log('PDF generated. Access it at:', response.url);
  }
})
.catch(error => {
  console.error('Error generating PDF:', error.message);
  if (error.response && error.response.data) {
    console.error('API Error Details:', error.response.data);
  }
});

To run this code, execute node generatePdf.js in your terminal. This script will call the CraftMyPDF API, populate your specified template with the provided data, and either save the resulting PDF locally or print a URL to the generated document.