WordPress Plugin

WordPress Plugin (Paperbolt)

The Paperbolt WordPress plugin connects your WordPress site to the LightningPDF API, letting you generate PDFs from posts, pages, and WooCommerce orders directly from your dashboard. All rendering happens in the cloud — zero server load, no PHP memory issues.

Installation

From LightningPDF (requires account)

  1. Download paperbolt.zip (requires login + verified email)
  2. In WordPress, go to Plugins → Add New → Upload Plugin
  3. Upload the ZIP and activate

From WordPress.org

  1. Go to Plugins → Add New in your WordPress admin
  2. Search for Paperbolt
  3. Click Install Now, then Activate

Setup

1. Get Your API Key

  1. Sign up at lightningpdf.dev (free, no credit card)
  2. Go to Settings → API Keys
  3. Click Create API Key and copy it

2. Connect the Plugin

  1. In WordPress, go to Paperbolt → Settings
  2. Paste your API key
  3. Click Test Connection — you should see your plan name and credit balance
  4. Click Save Settings

3. Enable Post PDFs

Check Enable PDF Button under the General tab. Choose which post types get the button (posts, pages, or custom post types).

Features

Post & Page PDFs

When enabled, a "Download PDF" button appears below your post content. Visitors click it to download the post as a styled PDF.

Configuration:

  • Paper Size — A4, Letter, Legal, or custom dimensions
  • Orientation — Portrait or landscape
  • Margins — Top, right, bottom, left (in mm)
  • Custom CSS — Add CSS that only applies to PDFs (e.g. hide navigation, adjust fonts)

Shortcode

Add a PDF download button anywhere with the [paperbolt] shortcode:

[paperbolt text="Download PDF"]

Attributes:

Attribute Default Description
text Download PDF Button label
class paperbolt-btn CSS class
template Template ID from your account
source current_post current_post or html
filename Post title Custom filename
paper Settings default Paper size override
orientation Settings default portrait or landscape

Custom HTML source:

[paperbolt source="html" html="<h1>Custom content</h1><p>This HTML becomes a PDF</p>"]

Gutenberg Block

Search for Paperbolt in the block inserter. The block provides the same options as the shortcode with a visual interface.

Templates

Manage templates synced from your LightningPDF account:

  1. Go to Paperbolt → Templates
  2. My Templates shows templates from your account
  3. Starter Templates offers pre-built templates you can import with one click

Templates support variables that get replaced with post data:

Variable Value
{{title}} Post title
{{content}} Post content (HTML)
{{author}} Author display name
{{date}} Publication date
{{featured_image}} Featured image URL
{{site_name}} Site name (from WordPress settings)
{{site_url}} Site URL
{{categories}} Comma-separated category names
{{tags}} Comma-separated tag names

WooCommerce Integration

Setup

  1. In Paperbolt → Settings, check Enable WooCommerce
  2. Fill in your company details:
    • Company name, logo URL, address
    • Invoice number format (e.g., INV-{YYYY}-{####})
    • Tax label and footer text
  3. Configure auto-attach under WooCommerce → Settings → Paperbolt

Documents

The plugin generates three document types:

  • Invoice — Full order invoice with line items, tax, totals, and your company branding
  • Packing Slip — Shipping-focused document with item quantities (no prices)
  • Receipt — Customer-facing payment confirmation

Auto-Attach to Emails

Under WooCommerce → Settings → Paperbolt, enable auto-attach for specific order statuses. When WooCommerce sends an order email (e.g., "Order Complete"), the invoice PDF is automatically attached.

Order Actions

On any order edit screen, find the Paperbolt metabox with buttons to download or regenerate each document type.

Bulk Invoice Generation

  1. Go to WooCommerce → Orders
  2. Select multiple orders
  3. Choose Generate Invoices (Paperbolt) from the bulk actions dropdown

Customer My Account

Customers can download their invoices from My Account → Orders — each order row gets a PDF invoice icon.

Invoice Number Format

Configure the format in Paperbolt → Settings → WooCommerce:

Placeholder Output
{####} Zero-padded number (0001, 0002...)
{YYYY} Current year (2026)
{MM} Current month (01-12)
{DD} Current day (01-31)

Example: INV-{YYYY}-{####}INV-2026-0001

Bulk Generation

Admin UI

  1. Go to Posts (or any enabled post type)
  2. Select posts using the checkboxes
  3. Choose Generate PDF (Paperbolt) from bulk actions
  4. For multiple posts, a ZIP file is downloaded. For a single post, you get the PDF directly.

WP-CLI

Generate PDFs from the command line:

# Generate PDF for a single post
wp paperbolt generate 42

# Generate with custom output directory
wp paperbolt generate 42 --output=/path/to/dir/

Caching

The plugin caches generated PDFs using WordPress transients. When a visitor downloads the same post as PDF, the cached version is served instead of making another API call.

  • Cache TTL — Configurable in settings (default: 1 hour)
  • Clear cache — Edit and save the post, or wait for expiry
  • Daily cleanup — A cron job removes expired cache entries automatically

Usage Dashboard

Go to Paperbolt → Settings and check the Usage tab to see:

  • Current plan name
  • Credits used / total this month
  • Credit reset date
  • A link to upgrade your plan

The data syncs hourly via a background cron job. A low-credit warning appears in the admin bar when you're below 10% remaining.

Troubleshooting

"Connection failed" on test

  • Verify your API key is correct (starts with lpdf_)
  • Check that your server can make outbound HTTPS requests (some shared hosts block them)
  • Try with a different API key

PDFs look different from the browser

  • Add custom CSS in Paperbolt → Settings → Advanced to adjust PDF styling
  • Use the Chromium engine for full CSS support (flexbox, grid, custom fonts)
  • The native engine is faster but has limited CSS support

WooCommerce invoices not attaching

  • Verify Auto-Attach is enabled under WooCommerce → Settings → Paperbolt
  • Check the order status matches your auto-attach settings
  • Look for errors in Paperbolt → Settings → Usage or your server error log

Out of credits

  • Check your usage at Paperbolt → Settings → Usage
  • Upgrade your plan for more credits
  • Post-processing operations (compress, protect) are free

Next Steps