PDF Generation API
Convert any web page to high-quality PDF documents programmatically. Full JavaScript rendering, custom page dimensions, and reliable output for invoices, reports, compliance documentation, and content preservation.
The PDF generation challenge.
Converting web pages to PDF seems straightforward, but dynamic content, complex layouts, and authentication barriers make programmatic PDF generation a persistent engineering challenge.
Simple HTML-to-PDF tools miss JavaScript-rendered content, interactive charts, and dynamically loaded data.
Complex CSS layouts, flexbox, grid, and media queries often break when converting to fixed PDF page formats.
Content gets cut off at page boundaries, tables split awkwardly, and images overflow margins without proper handling.
Pages behind login screens, paywalls, or cookie-based sessions require browser-level authentication to access.
PDF generation use cases.
Invoice & receipt archiving
Automatically convert online invoices, receipts, and billing statements into PDF documents for accounting and tax compliance. Scrape and archive invoices from supplier portals, SaaS dashboards, and e-commerce platforms on a schedule. Build a searchable document archive with consistent formatting regardless of the source.
- Automate monthly invoice collection from 50+ vendor portals
- Reduce manual document processing time by 80%
- Maintain audit-ready document archives
- Ensure compliance with document retention requirements
Compliance documentation
Generate PDF snapshots of web content for regulatory compliance and legal evidence. Capture terms of service changes, privacy policy updates, advertising claims, and public disclosures as they appeared at specific points in time. Create immutable records for legal teams, regulators, and auditors.
- Create timestamped records of regulatory disclosures
- Archive competitor advertising claims for legal review
- Meet GDPR, CCPA, and industry-specific documentation requirements
- Provide court-admissible evidence of web content
Report generation
Convert web-based dashboards, analytics reports, and data visualizations into distributable PDF documents. Generate weekly or monthly reports from tools like Google Analytics, Looker, and custom dashboards. Share insights with stakeholders who prefer PDF documents over live dashboards.
- Automate weekly executive report generation
- Convert live dashboards to shareable PDF documents
- Schedule automated report delivery to stakeholders
- Archive historical performance data as PDF snapshots
Content preservation
Archive web articles, research papers, blog posts, and online documentation as PDF documents before they disappear or change. Build knowledge libraries from web content that may not persist. Preserve formatting, images, and layout in a portable document format that works offline.
- Archive valuable content before it’s removed or changed
- Build offline-accessible knowledge libraries from web sources
- Preserve research materials with original formatting
- Create distributable copies of online-only content
How PDF generation works.
Convert any web page to PDF in three steps.
Send a Scrape API request
Use the Scrape API with content_type: "pdf" and provide the target URL. Optionally configure viewport dimensions for the browser rendering, wait conditions to ensure dynamic content is loaded, and custom headers or cookies for authenticated pages. A single API call is all it takes.
Browser renders & converts
Ujeebu launches a headless Chromium browser, navigates to the URL, executes all JavaScript, waits for content to fully load, and converts the rendered page to PDF using Chrome’s built-in PDF printing engine. This ensures perfect CSS rendering, proper fonts, and accurate layout in the output document.
Receive the PDF document
Get your PDF document as a base64-encoded response or have it uploaded directly to your S3, Google Cloud Storage, or other destination. The PDF preserves all visual elements including images, charts, and styling. Integrate with webhooks for async processing in batch workflows.
Try PDF generation now.
Enter any URL to convert it to PDF in the playground.
curl "https://api.ujeebu.com/scrape" \
-H "Authorization: Bearer YOUR_KEY" \
-d url=https://stripe.com/pricing \
-d render=true \
-d content_type=pdf \
--output capture.pdf
PDF generation features.
Full-page PDF
Generate PDFs that capture the entire page content, properly paginated and formatted. Long pages are automatically split across multiple PDF pages with intelligent page break handling to avoid cutting text or images mid-element.
Custom dimensions
Control the viewport width and height used for rendering before conversion. Set exact page dimensions to match standard paper sizes (A4, Letter) or custom formats. Adjust margins and scaling to get the precise PDF layout you need.
JavaScript execution
Full Chromium-based JavaScript rendering converts even the most complex SPAs and dynamic web applications to PDF. React, Vue, Angular, and any JavaScript framework is fully supported with complete DOM rendering.
Wait conditions
Wait for specific selectors, network idle, or custom JavaScript conditions before generating the PDF. Ensure charts are rendered, data tables are loaded, and all async content is present in the final document.
Scroll support
Automatically scroll through pages to trigger lazy-loaded content, infinite scroll sections, and dynamically loaded elements before PDF generation. Capture the complete page content, not just what’s initially visible.
Proxy support
Access geo-restricted or protected content through residential and datacenter proxies. Bypass anti-bot detection with fingerprint randomization and stealth mode. Generate PDFs from any publicly accessible web page worldwide.
Frequently asked questions.
What page sizes are supported for PDF output?
Can I convert pages with JavaScript frameworks to PDF?
How do I handle pages that require login?
What’s the maximum page length for PDF generation?
Can I generate PDFs from pages with anti-bot protection?
Explore other use cases
View all →Start generating PDFs today.
Convert any web page to a high-quality PDF with a single API call.