PDF API
Webpage to PDF API
Convert any webpage to high-quality PDF documents with our reliable PDF generation API. Perfect for archiving, reporting, and document management.
API Examples
Common use cases and configuration options
Basic PDF conversion
Convert a webpage to PDF with default settings
POST: https://api.agenty.ai/v1/pdf
{
"url": "https://example.com",
"options": {
"format": "A4"
}
}Custom format and orientation
Generate PDF with specific format and orientation
POST: https://api.agenty.ai/v1/pdf
{
"url": "https://example.com",
"options": {
"format": "A4",
"landscape": true
}
}PDF with custom margins
Set custom margins for the PDF output
POST: https://api.agenty.ai/v1/pdf
{
"url": "https://example.com",
"options": {
"format": "A4",
"margin": {
"top": "20px",
"bottom": "20px",
"left": "20px",
"right": "20px"
}
}
}Print media CSS
Use print-specific CSS styles for PDF generation
POST: https://api.agenty.ai/v1/pdf
{
"url": "https://example.com",
"emulateMedia": "print",
"options": {
"printBackground": true,
"preferCSSPageSize": true
}
}Powerful PDF Generation Features
Everything you need for professional PDF creation
High-quality PDF generation
Custom page formats (A4, Letter, Legal)
Portrait and landscape orientation
Custom margins and headers/footers
Print-optimized styling
Batch PDF generation
Use Cases
How businesses use our PDF API
Document Archiving
Convert web pages to PDF for long-term storage and archival purposes
Report Generation
Generate PDF reports from web-based dashboards and analytics
Invoice Processing
Convert online invoices and receipts to PDF format
Content Preservation
Preserve web content in a portable, printable format
Ready to get started?
Start converting webpages to PDF with our powerful API today.
No credit card required
14-day free trial
Cancel anytime