Skip to main content
All posts
PDF HTML Markdown web app tutorial no-code

How to Use PodPDF to Convert Any HTML or Markdown Document on the Web

Convert HTML and Markdown documents to PDF with PodPDF: no code in the web app, full control through the API. A practical guide to both.

PodPDF Team April 26, 2026 7 min read

PodPDF gives you two ways to convert documents to PDF: a visual web application that anyone can use without code, and a REST API for developers and automation workflows. This guide covers both paths.

Path 1: The Web Application (No Code Required)

The PodPDF web app at app.podpdf.com is designed for anyone who needs to convert documents without writing code.

Getting Started

  1. Create an account and buy credits — $0.01 per PDF, credits never expire
  2. Log in and open the Convert page
  3. Choose a tab: HTML, Markdown, Images, URL, or Bulk

Converting HTML

Option A: Paste HTML directly Open the HTML tab, paste your HTML into the editor, and generate. A preview of the PDF appears when it’s ready.

Option B: Upload an HTML file Drop a .html file onto the upload area. Stylesheets, fonts, and images referenced by absolute HTTPS URL (for example from a CDN) are fetched while rendering.

Tips for HTML input:

  • Include a full <!DOCTYPE html> declaration for best results
  • Use absolute HTTPS URLs for images and external stylesheets in single documents
  • Add @media print CSS rules if you want to hide navigation or sidebars
  • Test with your real HTML before converting large volumes

Converting Markdown

Open the Markdown tab. You can:

  • Paste Markdown text directly into the editor
  • Upload a .md file

GitHub Flavored Markdown is supported: headings, bold/italic, code blocks, tables, task lists, blockquotes, and images from absolute URLs.

Converting Images

Open the Images tab and add one or more PNG or JPEG files. Each image becomes one page, up to 25 per PDF.

Converting from a URL

Enter a public HTTPS URL. PodPDF fetches it and converts what comes back — HTML pages, Markdown files, or PNG and JPEG images. This is useful for:

  • Archiving hosted invoices or reports
  • Converting a Markdown file hosted on GitHub

The page is fetched server-side, so assets it references by relative path won’t load. For pages you control, pasting the HTML works best.

Converting a Whole Folder

The Bulk tab takes a folder or a ZIP of HTML or Markdown files and returns a ZIP of PDFs. Relative CSS and images inside the folder keep working. See Bulk HTML and Markdown to PDF for how it works.

PDF Settings

Before generating, configure your PDF:

SettingOptions
Page formatA4, A3, A5, Letter, Legal, Tabloid
OrientationPortrait, Landscape
MarginsTop, right, bottom, left
Background graphicsOn / Off
ScaleShrink or enlarge rendered content

Header and footer templates are available through the API.

Downloading Your PDF

After generation, download the PDF directly. If you turn on storage, the file is kept for 30 days and can be downloaded again from your job history during that time.

Job History

Every conversion — from the web app or the API — appears in your job history. You can:

  • See status (queued, processing, completed, partially failed, failed)
  • Filter by status and job type
  • See page counts and input type
  • Download stored PDFs and bulk ZIPs for 30 days

Path 2: The API (For Developers and Automation)

The PodPDF REST API uses the same rendering engine as the web app, from any language or tool.

Authentication

Send your API key in the X-API-Key header:

X-API-Key: YOUR_API_KEY

Create a key under Settings → API Keys in the dashboard. It’s shown only once, so store it somewhere safe.

Convert HTML

curl -X POST https://api.podpdf.com/quickjob \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_type": "html",
    "html": "<!DOCTYPE html><html><body><h1>My Document</h1><p>Hello, PodPDF!</p></body></html>",
    "options": {
      "format": "A4",
      "margin": { "top": "20mm", "bottom": "20mm", "left": "20mm", "right": "20mm" }
    }
  }' \
  --output document.pdf

Convert Markdown

curl -X POST https://api.podpdf.com/quickjob \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_type": "markdown",
    "markdown": "# My Document\n\nThis is a paragraph.\n\n## Section 1\n\n- Item A\n- Item B",
    "options": { "format": "A4" }
  }' \
  --output document.pdf

Convert a URL

curl -X POST https://api.podpdf.com/quickjob \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_type": "url",
    "url": "https://example.com/report.html",
    "options": { "format": "A4" }
  }' \
  --output report.pdf

API Response

By default, /quickjob responds with the PDF itself (Content-Type: application/pdf), and the X-PDF-Pages header carries the page count.

Add "store": true to the request to get JSON back instead:

{
  "job_id": "9f0a4b78-2c0c-4d14-9b8b-123456789abc",
  "pages": 4,
  "truncated": false,
  "download_url": "https://...",
  "download_url_expires_at": "2026-04-26T15:30:00.000Z"
}

download_url is valid for one hour; the file is kept for 30 days and GET /jobs/{job_id}/download issues a fresh link.

Errors are JSON with a machine-readable code:

{ "error": { "code": "PAGE_LIMIT_EXCEEDED", "message": "..." } }

Language Examples

Python:

import requests

response = requests.post(
    "https://api.podpdf.com/quickjob",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={
        "input_type": "html",
        "html": "<h1>Python PDF</h1><p>Generated via PodPDF API.</p>",
        "options": {"format": "A4"},
    },
)
response.raise_for_status()

with open("output.pdf", "wb") as f:
    f.write(response.content)

Node.js:

import { writeFile } from "node:fs/promises";

const response = await fetch("https://api.podpdf.com/quickjob", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    input_type: "html",
    html: "<h1>Node.js PDF</h1>",
    options: { format: "A4" },
  }),
});

if (!response.ok) throw new Error(JSON.stringify(await response.json()));
await writeFile("output.pdf", Buffer.from(await response.arrayBuffer()));

PHP:

$pdf = file_get_contents('https://api.podpdf.com/quickjob', false, stream_context_create([
  'http' => [
    'method' => 'POST',
    'header' => "X-API-Key: YOUR_API_KEY\r\nContent-Type: application/json\r\n",
    'content' => json_encode([
      'input_type' => 'html',
      'html' => '<h1>PHP PDF</h1>',
      'options' => ['format' => 'A4'],
    ]),
  ],
]));

file_put_contents('output.pdf', $pdf);

Practical Use Cases

1. Archiving hosted documents

You have a URL to a hosted invoice, report, or Markdown file. Paste the URL into the web app and save a PDF copy.

2. Automated invoice generation

Your billing system renders an HTML invoice populated with customer data. Call the PodPDF API from your backend, receive the PDF in the response, and attach it to the customer email — all in the same request cycle.

3. Weekly PDF reports from Markdown

Your reporting pipeline outputs Markdown (from a script, a Notion export, or a README). Use the PodPDF API to convert each report to PDF and store it in S3 or Google Drive automatically.

4. Converting documentation for offline use

Your product docs are written in Markdown. Use bulk conversion to turn the whole folder into PDFs in one job, with images kept intact.

5. No-code PDF generation for non-technical teams

A marketing or ops team regularly needs formatted PDFs — campaign summaries, partner reports, client proposals. The web app handles this without developer involvement: paste content, generate, download.


Tips and Best Practices

Start with the web app to validate your template — Before integrating the API, use the web app to confirm your HTML or Markdown renders as expected. Iterate visually first, then automate.

Use absolute URLs in single documents — Images, fonts, and stylesheets must be absolute HTTPS URLs when you send one document. Relative paths only work in bulk jobs, where the files ship together.

Set explicit margins — There’s no default page margin. For documents with headers and footers, leave at least 15mm at the top and bottom to avoid clipping.

Handle errors explicitly — Check the HTTP status before treating the response as a PDF. Error responses are JSON with a code your integration can branch on.

Monitor via the dashboard — API jobs appear in your job history too. Use it to audit PDF generation, troubleshoot failed jobs, and track usage.


Pricing

  • Pay As You Go: $0.01 per PDF, credits never expire, no per-account rate limit
  • Enterprise: Volume pricing and monthly invoicing — contact us

Get started at app.podpdf.com.

Start generating PDFs today

$0.01 per PDF — no subscriptions, no monthly minimums. Credits never expire.