html2pdf.app - HTML to PDF conversion API
  • Features
  • Code examples
  • Pricing
  • Documentation
Login
Get API key

HTML to PDF API code examples

Practical server-side examples for converting URLs and HTML into PDF files with the html2pdf.app API.

cURL

Use cURL to test the HTML to PDF API from a terminal, shell script, CI job, or backend task.

View guide
PHP

Use PHP and cURL to generate PDFs from Laravel, Symfony, WordPress, or plain PHP backends.

View guide
Node.js

Use native fetch in Node.js to create PDFs from API routes, workers, queues, or command line scripts.

View guide
Python

Use Python requests to generate PDFs from Django, Flask, FastAPI, notebooks, or batch scripts.

View guide
Ruby

Use Ruby standard library HTTP clients to generate PDFs from Rails, Sidekiq, Rake tasks, or scripts.

View guide
Java

Use the Java HttpClient API to generate PDFs from Spring Boot services, jobs, or CLI tools.

View guide
C# / .NET

Use C# and HttpClient to generate PDFs from ASP.NET Core applications, services, workers, or console apps.

View guide
Go

Use Go standard library HTTP clients to generate PDFs from services, CLIs, workers, or cron jobs.

View guide
html2pdf.app
Product
  • HTML to PDF API
  • Pricing
  • Documentation
  • Code examples
Tools
  • HTML to PDF Online Converter
  • Playground
  • WordPress PDF Plugin
Resources
  • Templates
  • Blog
  • API Status
Legal
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Data Processing Agreement

©2026 html2pdf.app

Xgithub