HTML to PDF API
Convert web pages and HTML files to PDF
Documentation & Libraries
View API Documentation
Working examples, technical guides, and parameter reference
Official Client Libraries
Your First API Call
# install: "pip install pdfcrowd" import pdfcrowd api = pdfcrowd.HtmlToPdfClient("username", "apikey") api.convertUrlToFile("https://example.com", "example.pdf")
// install: "composer require pdfcrowd/pdfcrowd" require "pdfcrowd.php"; $api = new \Pdfcrowd\HtmlToPdfClient("username", "apikey"); $api->convertUrlToFile("http://example.com", "example.pdf");
// install: "npm install pdfcrowd" var pdfcrowd = require("pdfcrowd"); var api = new pdfcrowd.HtmlToPdfClient("username", "apikey"); api.convertUrlToFile("https://example.com", "example.pdf", function(err, fileName) { /* done */ });
curl -u "username:apikey" \ -F "url=https://example.com" \ -o example.pdf \ https://api.pdfcrowd.com/convert/24.04/
// Maven: https://search.maven.org/artifact/com.pdfcrowd/pdfcrowd/ import com.pdfcrowd.*; Pdfcrowd.HtmlToPdfClient api = new Pdfcrowd.HtmlToPdfClient("username", "apikey"); api.convertUrlToFile("https://example.com", "example.pdf");
// nuget install -OutputDirectory packages Pdfcrowd.Official pdfcrowd.HtmlToPdfClient api = new pdfcrowd.HtmlToPdfClient("username", "apikey"); api.convertUrlToFile("https://example.com", "example.pdf");
# install: "gem install pdfcrowd" require "pdfcrowd" api = Pdfcrowd::HtmlToPdfClient.new("username", "apikey") api.convertUrlToFile("https://example.com", "example.pdf")
// install: "go get github.com/pdfcrowd/pdfcrowd-go" import ("github.com/pdfcrowd/pdfcrowd-go") api := pdfcrowd.NewHtmlToPdfClient("username", "apikey") api.ConvertUrlToFile("https://example.com", "example.pdf")
Use Cases
- Report exports from web applications
- Archiving web content
- Invoice and receipt generation
- Automated document workflows
- Certificate and ticket generation
- Marketing materials and brochures
- Product catalogs
- Legal document generation
- Data sheets and technical specifications
Core Features
- Headers and footers
- Page size and margins
- Convert from URL or HTML file
- JavaScript and CSS injection
- Viewport width control (mobile/desktop)
- Watermarks (background and foreground)
- Page breaks control
- PDF password protection
- 100+ configuration parameters available