# API2PDF > API2PDF (api2pdf.com) is a serverless REST API for generating and converting documents: HTML, URLs and Markdown to PDF or images with Headless Chrome or wkhtmltopdf; Word, Excel, PowerPoint, images and 100+ other file types to PDF with LibreOffice; merge, extract pages, watermark and password-protect PDFs; convert PDFs and Office files to Markdown, HTML or JSON for data extraction; barcodes and QR codes with ZXing. Pricing is pay as you go: $1 per month plus $0.001 per MB of bandwidth and $0.00019551 per second of compute; a new account gets one month of free credit. There are no rate limits, no page limits and no file-size limits beyond 2 GB RAM and 90 seconds per request (V2 XL endpoints are available for more). Founded in 2018, incorporated in Austin, Texas; runs on Google Cloud Run in us-central1. Base URL: https://v2.api2pdf.com. Authenticate with an `Authorization: ` header. Every endpoint returns JSON with a `FileUrl` to the generated file; files are deleted after 24 hours. Interactive OpenAPI docs: https://v2.api2pdf.com/swagger/index.html. Portal (API keys, balance, logs): https://portal.api2pdf.com. Support: support@api2pdf.com. ## For AI agents - MCP server: `https://mcp.api2pdf.com/mcp` (Streamable HTTP). Send the API key as the `Authorization` header. Tools: html_to_pdf, url_to_pdf, markdown_to_pdf, url_to_image, html_to_image, office_to_pdf, merge_pdfs, extract_pdf_pages, watermark_pdf, pdf_to_markdown, check_balance. See [Api2Pdf now has an MCP server](https://www.api2pdf.com/Api2Pdf-now-has-an-MCP-server). - x402 pay per request: agents without an account can pay for a single request with USDC on Base via the x402 protocol. See [Api2Pdf accepts x402 payments](https://www.api2pdf.com/Api2Pdf-Now-Accepts-x402-Payments-AI-Agents-Can-Generate-PDFs-Without-an-Account). - Minimal example: `POST https://v2.api2pdf.com/chrome/pdf/html` with JSON body `{"html":"

Hello

","inline":false,"fileName":"hello.pdf"}` and header `Authorization: YOUR_API_KEY`; the response contains `FileUrl`. ## Endpoints (POST, JSON body, base https://v2.api2pdf.com) - `/chrome/pdf/html`: HTML to PDF with Headless Chrome (body: html, options such as landscape, printBackground, marginTop, headerTemplate, footerTemplate) - `/chrome/pdf/url`: URL to PDF with Headless Chrome (body: url, options) - `/chrome/pdf/markdown`: Markdown to PDF with Headless Chrome (body: markdown, options) - `/chrome/image/html`: HTML to PNG/JPEG screenshot (body: html, options, viewPortOptions) - `/chrome/image/url`: URL to PNG/JPEG screenshot (body: url, options, viewPortOptions) - `/wkhtml/pdf/html`: HTML to PDF with wkhtmltopdf - `/wkhtml/pdf/url`: URL to PDF with wkhtmltopdf - `/libreoffice/any-to-pdf`: Word, Excel, PowerPoint, Publisher, images, TXT, EML and any LibreOffice-openable file to PDF (body: url) - `/libreoffice/thumbnail`: First-page thumbnail image of a PDF or Office document (body: url) - `/libreoffice/html-to-docx`: HTML to Word (.docx) - `/libreoffice/html-to-xlsx`: HTML table to Excel (.xlsx) - `/libreoffice/pdf-to-html`: PDF to HTML - `/pdfsharp/merge`: Merge PDFs (body: urls[] in order) - `/pdfsharp/extract-pages`: Extract a page range from a PDF (body: url, start, end) - `/pdfsharp/password`: Add a user and owner password to a PDF (body: url, userpassword, ownerpassword) - `/pdf/watermark`: Stamp a text or image watermark on every page of a PDF - `/markitdown`: PDF, Office, HTML and other files to Markdown (MarkItDown) - `/opendataloader/markdown, /opendataloader/html, /opendataloader/json`: Structured data extraction from PDFs (OpenDataLoader) - `/zebra`: Barcodes and QR codes with ZXing (body: format, value, showlabel, height, width) Client libraries exist for Python (`api2pdf` on PyPI), Node (`api2pdf` on npm), .NET (`Api2Pdf` on NuGet), PHP, Java, Ruby, Go and Power Automate / Zapier; plain HTTP works from any language. ## Product - [API2PDF Infrastructure Fact Sheet](https://www.api2pdf.com/API2PDF-Infrastructure-Fact-Sheet) - [Contact Us](https://www.api2pdf.com/contact-us) - [Enterprise Managed Hosting](https://www.api2pdf.com/enterprise/managed-hosting) - [Enterprise Self Hosted](https://www.api2pdf.com/enterprise/self-hosted) - [Enterprise](https://www.api2pdf.com/enterprise) - [FAQ](https://www.api2pdf.com/faq) - [Pricing](https://www.api2pdf.com/pricing) ## Use cases and how-tos - [Add a Password to an Existing PDF using REST API](https://www.api2pdf.com/add-password-to-existing-pdf-with-rest-api) - [Create thumbnail images of PDFs and Office Files with REST API](https://www.api2pdf.com/rest-api-for-thumbnail-of-pdf-and-office-files) - [Extract Pages from PDF using REST API](https://www.api2pdf.com/rest-api-to-extract-pages-from-pdf) - [HTML to PDF API using Serverless](https://www.api2pdf.com/html-to-pdf-api-using-serverless) - [Headless Chrome on AWS Lambda](https://www.api2pdf.com/headless-chrome-on-aws-lambda) - [LibreOffice on AWS Lambda](https://www.api2pdf.com/libreoffice-on-aws-lambda) - [Merge PDFs on Serverless](https://www.api2pdf.com/merge-pdfs-on-serverless) - [Screenshot API for URLs and HTML](https://www.api2pdf.com/screenshot-api-for-urls-and-html) - [Word to PDF API on Serverless](https://www.api2pdf.com/word-to-pdf-api-on-serverless) - [wkhtmltopdf on AWS Lambda](https://www.api2pdf.com/wkhtmltopdf-on-aws-lambda) ## Documentation - [Advanced Options – Headless Chrome](https://www.api2pdf.com/documentation/advanced-options-headless-chrome) - [Advanced Options – WKHTMLTOPDF](https://www.api2pdf.com/documentation/advanced-options-wkhtmltopdf) - [Advanced Options – ZXING (Zebra Crossing) Barcodes](https://www.api2pdf.com/documentation/advanced-options-zxing-zebra-crossing-barcodes) ## Alternatives and comparisons - [API2PDF Alternatives - List of APIs for generating PDFs](https://www.api2pdf.com/alternatives) - [ConvertApi Alternative: Compare ConvertApi with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/convertapi-alternative-compare-convertapi-with-api2pdf-for-html-to-pdf-conversion) - [DocRaptor Alternative: Compare DocRaptor with Api2Pdf.com for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/docraptor-alternative-compare-docraptor-with-api2pdf-com-for-html-to-pdf-conversion) - [Docamatic Alternative: Compare Docamatic with API2PDF for HTML to PDF conversion](https://www.api2pdf.com/alternatives/docamatic-alternative-compare-docamatic-with-api2pdf-for-html-to-pdf-conversion) - [EasyPDFCloud Alternative: Compare EasyPDFCloud with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/easypdfcloud-alternative-compare-easypdfcloud-with-api2pdf-for-html-to-pdf-conversion) - [HTMLPDFAPI Alternative: Compare HTMLPDFAPI with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/htmlpdfapi-alternative-compare-htmlpdfapi-with-api2pdf-for-html-to-pdf-conversion) - [HyPDF Alternative: Compare HyPDF with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/hypdf-alternative-compare-hypdf-with-api2pdf-for-html-to-pdf-conversion) - [PDFCrowd Alternative: Compare PDFCrowd with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/pdfcrowd-alternative-compare-pdfcrowd-with-api2pdf-for-html-to-pdf-conversion) - [PDFGeneratorAPI Alternative: Compare PDFGeneratorAPI with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/pdfgeneratorapi-alternative-compare-pdfgeneratorapi-with-api2pdf-for-html-to-pdf-conversion) - [PDFmyURL Alternative: Compare PDFmyURL with Api2Pdf for HTML](https://www.api2pdf.com/alternatives/pdfmyurl-alternative-compare-pdfmyurl-with-api2pdf-for-html) - [Paperplane.app Alternative: Compare Paperplane with API2PDF for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/paperplane-app-alternative-compare-paperplane-with-api2pdf-for-html-to-pdf-conversion) - [PdfBlade Alternative: Compare PdfBlade with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/pdfblade-alternative-compare-pdfblade-with-api2pdf-for-html-to-pdf) - [PdfShift Alternative: Compare PdfShift with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/pdfshift-alternative-compare-pdfshift-with-api2pdf-for-html-to-pdf-conversion) - [PdfSwitch Alternative: Compare PdfSwitch with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/pdfswitch-alternative-compare-pdfswitch-with-api2pdf-for-html-to-pdf-conversion) - [RestPack.io Alternative: Compare RestPack.io with Api2Pdf.com for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/restpack-io-alternative-compare-restpack-io-with-api2pdf-com-for-html-to-pdf-conversion) - [SelectPDF Alternative: Compare SelectPDF with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/selectpdf-alternative-compare-selectpdf-with-api2pdf-for-html-to-pdf-conversion) - [html2pdfrocket Alternative: Compare html2pdfrocket with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/html2pdfrocket-alternative-compare-html2pdfrocket-with-api2pdf-for-html-to-pdf-conversion) - [pdflayer Alternative: Compare pdflayer with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/pdflayer-alternative-compare-pdflayer-with-api2pdf-for-html-to-pdf-conversion) - [printfriendly Alternative: Compare printfriendly with Api2Pdf for HTML to PDF Conversion](https://www.api2pdf.com/alternatives/printfriendly-alternative-compare-printfriendly-with-api2pdf-for-html-to-pdf-conversion) ## Legal - [Privacy Policy](https://www.api2pdf.com/privacy-policy) - [Terms of Service](https://www.api2pdf.com/terms-of-service) ## Blog Posts are grouped into categories, each with its own index page: [Release notes](https://www.api2pdf.com/blog/release_notes), [Tutorials](https://www.api2pdf.com/blog/tutorials), [Troubleshooting](https://www.api2pdf.com/blog/troubleshooting), [Engineering](https://www.api2pdf.com/blog/engineering), [Alternatives](https://www.api2pdf.com/blog/alternatives), [Integrations](https://www.api2pdf.com/blog/integrations), [Company](https://www.api2pdf.com/blog/company). RSS: https://www.api2pdf.com/rss.xml (add ?category= for one category). ### Release notes - [Api2Pdf Now Accepts x402 Payments: AI Agents Can Generate PDFs Without an Account](https://www.api2pdf.com/Api2Pdf-Now-Accepts-x402-Payments-AI-Agents-Can-Generate-PDFs-Without-an-Account): AI agents can now generate PDFs, images and barcodes with Api2Pdf by paying per request with x402 (USDC on Base), with no API key or sign-up. - [Api2Pdf now has an MCP server](https://www.api2pdf.com/Api2Pdf-now-has-an-MCP-server): Connect Cursor, Claude Code, VS Code or your own agent to mcp.api2pdf.com and get 11 tools: HTML, URL and Markdown to PDF, screenshots, merge, extract and more. - [Convert Files to Markdown with the API2PDF MarkItDown API](https://www.api2pdf.com/Convert-Files-to-Markdown-with-the-API2PDF-MarkItDown-API): The new POST /markitdown endpoint converts PDFs, Office documents and other files into clean Markdown for search, storage and AI applications. - [Convert Markdown to PDF API endpoint now available](https://www.api2pdf.com/Convert-Markdown-to-PDF-API-endpoint-now-available): Send raw Markdown to POST /chrome/pdf/markdown and get a rendered PDF back from Headless Chrome, with no intermediate HTML step. - [Extract Data from PDFs with the API2PDF OpenDataLoader API](https://www.api2pdf.com/Extract-Data-from-PDFs-with-the-API2PDF-OpenDataLoader-API): Three new OpenDataLoader endpoints extract structured JSON, Markdown or HTML from any PDF, ready for search, RAG and LLM pipelines. - [Add Watermarks to PDFs with the API2PDF Watermark API](https://www.api2pdf.com/Add-Watermarks-to-PDFs-with-the-API2PDF-Watermark-API): Add text or image watermarks to PDFs programmatically with the new POST /pdf/watermark endpoint. Options, examples and pricing. - [Chrome binary upgraded to v152](https://www.api2pdf.com/Chrome-binary-upgraded-to-v152): The Headless Chrome engine behind the /chrome endpoints is now Chrome v152, keeping rendering and security current. - [V2 XL now available](https://www.api2pdf.com/V2-XL-now-available): v2-xl.api2pdf.com gives each request 4 CPU, 8 GB of memory and a 5 minute timeout for large or slow documents, at 10x the standard v2 price. - [Major upgrades released!](https://www.api2pdf.com/Major-upgrades-released): The Api2Pdf backend was rewritten from the ground up: a new runtime, upgraded Chrome, wkhtmltopdf and LibreOffice engines, and better performance. - [Extract pages out of a PDF with REST API](https://www.api2pdf.com/extract-pages-out-of-a-pdf-with-rest-api): The new PdfSharp extract-pages endpoint returns a PDF containing only the page range you specify. Documentation and examples. - [Set ViewPortOptions on Chrome > Screenshot API](https://www.api2pdf.com/set-viewportoptions-on-chrome-screenshot-api): The /chrome/image endpoints now accept a custom viewport width and height, so you can simulate mobile and other screen sizes in screenshots. - [omitBackground added to Chrome to PDF](https://www.api2pdf.com/omitbackground-added-to-chrome-to-pdf): Set omitBackground to true on the Chrome PDF endpoints to render a transparent page background. Added with PuppeteerSharp 5.1.0. - All 24 posts: https://www.api2pdf.com/blog/release_notes ### Tutorials - [Background color on header / footer in Headless Chrome](https://www.api2pdf.com/background-color-on-header-footer-in-headless-chrome): Header and footer templates in Headless Chrome ignore background colors by default. The CSS that makes them print, with Puppeteer and the API. - [Generate PDF from Cloudflare Worker with Headless Chrome](https://www.api2pdf.com/generate-pdf-from-cloudflare-worker-with-headless-chrome): Cloudflare Workers cannot run Headless Chrome. Call the Api2Pdf REST API from a Worker with fetch to convert HTML or URLs to PDF. Sample code. - [Add Passwords to PDFs with Python](https://www.api2pdf.com/add-password-to-pdf-with-python): Add a user and owner password to an existing PDF from Python with the PdfSharp password endpoint. A few lines of code. - [Convert HTML to Docx with PHP](https://www.api2pdf.com/convert-html-to-docx-with-php): Generate a Microsoft Word document from HTML in PHP with the LibreOffice html-to-docx endpoint, without installing LibreOffice. - [Convert HTML to Image with Node / Javascript](https://www.api2pdf.com/convert-html-to-image-with-node-javascript): Render HTML to a PNG or JPEG image from Node.js with Headless Chrome through the Api2Pdf REST API. A few lines of JavaScript, no browser to manage. - [Python – Convert HTML to Xlsx](https://www.api2pdf.com/python-convert-html-to-xlsx): Turn an HTML table into an Excel workbook from Python with the LibreOffice html-to-xlsx endpoint. Sample code included. - [Convert HTML to Image with PHP](https://www.api2pdf.com/convert-html-to-image-with-php): Render HTML to a PNG or JPEG image from PHP with Headless Chrome through the Api2Pdf REST API. A few lines of code, no browser to manage. - [PHP – Convert HTML to Xlsx](https://www.api2pdf.com/php-convert-html-to-xlsx): Turn an HTML table into an Excel workbook from PHP with the LibreOffice html-to-xlsx endpoint. Sample code included. - [Convert HTML to Docx with C# / .NET Core](https://www.api2pdf.com/convert-html-to-docx-with-c-net-core): Generate a Microsoft Word document from HTML in .NET Core with the LibreOffice html-to-docx endpoint, without interop or a local LibreOffice install. - [Convert HTML to Image with Python](https://www.api2pdf.com/convert-html-to-image-with-python): Render HTML to a PNG or JPEG image from Python with Headless Chrome through the Api2Pdf REST API. A few lines of code, no browser to manage. - [Python – take a screenshot of a website](https://www.api2pdf.com/python-take-a-screenshot-of-a-website): Convert any URL to a PNG screenshot from Python with Headless Chrome through the Api2Pdf REST API. Sample code included. - [Add bookmarks to PDF with Python](https://www.api2pdf.com/add-bookmarks-to-pdf-with-python): Add a navigable bookmark outline to an existing PDF from Python with the PdfSharp bookmarks endpoint. Sample code included. - [Nodejs / Javascript – Convert HTML to Xlsx](https://www.api2pdf.com/nodejs-convert-html-to-xlsx): Turn an HTML table into an Excel workbook from Node.js with the LibreOffice html-to-xlsx endpoint. Sample code included. - [PHP Tutorial – Convert PDF to HTML](https://www.api2pdf.com/php-tutorial-convert-pdf-to-html): Extract the text of a PDF as HTML from PHP with the pdf-to-html endpoint, useful for indexing and search. Sample code. - [Node / Javascript – take a screenshot of a website](https://www.api2pdf.com/node-javascript-take-a-screenshot-of-a-website): Convert any URL to a PNG screenshot from Node.js with Headless Chrome through the Api2Pdf REST API. Sample code included. - [Add bookmarks to PDF with Nodejs / Javascript](https://www.api2pdf.com/add-bookmarks-to-pdf-with-nodejs-javascript): Add a navigable bookmark outline to an existing PDF from Node.js with the PdfSharp bookmarks endpoint. Sample code included. - [Add bookmarks to PDF with PHP](https://www.api2pdf.com/add-bookmarks-to-pdf-with-php): Add a navigable bookmark outline to an existing PDF from PHP with the PdfSharp bookmarks endpoint. Sample code included. - [PHP – take a screenshot of a website](https://www.api2pdf.com/php-take-a-screenshot-of-a-website): Convert any URL to a PNG screenshot from PHP with Headless Chrome through the Api2Pdf REST API. Sample code included. - [C# / .NET Tutorial – Convert PDF to HTML](https://www.api2pdf.com/c-net-tutorial-convert-pdf-to-html): Extract the text of a PDF as HTML from .NET with the pdf-to-html endpoint, useful for indexing and search. Sample C# code. - [Nodejs / Javascript Tutorial – Convert PDF to HTML](https://www.api2pdf.com/nodejs-javascript-tutorial-convert-pdf-to-html): Extract the text of a PDF as HTML from Node.js with the pdf-to-html endpoint, useful for indexing and search. Sample code. - [Convert HTML to Docx with Nodejs / Javascript](https://www.api2pdf.com/convert-html-to-docx-with-nodejs-javascript): Generate a Microsoft Word document from HTML in Node.js with the LibreOffice html-to-docx endpoint, without installing LibreOffice. - [C# / .NET – Convert HTML to Xlsx](https://www.api2pdf.com/c-net-convert-html-to-xlsx): Turn an HTML table into an Excel workbook from C# with the LibreOffice html-to-xlsx endpoint. Sample .NET code included. - [Add a Password to a PDF with PHP](https://www.api2pdf.com/add-a-password-to-a-pdf-with-php): Add a user and owner password to an existing PDF from PHP with the PdfSharp password endpoint. A few lines of code. - [Python Tutorial – Convert PDF to HTML](https://www.api2pdf.com/python-tutorial-convert-pdf-to-html): Extract the text of a PDF as HTML from Python with the pdf-to-html endpoint, useful for indexing and search. Sample code. - [PHP – Generate thumbnail image of PDF or Office file](https://www.api2pdf.com/php-generate-thumbnail-image-of-pdf-or-office-file): Create an image preview of a PDF, Word, Excel or PowerPoint file from PHP with the /libreoffice/thumbnail endpoint. Sample code. - All 61 posts: https://www.api2pdf.com/blog/tutorials ### Troubleshooting - [Test your HTML locally first](https://www.api2pdf.com/Test-your-HTML-locally-first): A quick way to troubleshoot PDF output: save the exact HTML you send to Api2Pdf as a file, open it in Chrome and use print preview. - [[resolved] 403 Forbidden error message in logs](https://www.api2pdf.com/resolved-403-forbidden-error-message-in-logs): A 403 in your logs on any-to-pdf, merge, password or bookmarks means your server refused Api2Pdf's download request. How to allow it. - [[Resolved] PdfSharp – invalid entry in XRef table](https://www.api2pdf.com/resolved-pdfsharp-invalid-entry-in-xref-table): The 'invalid entry in XRef table' error when merging PDFs with PdfSharpCore, what causes it in the source PDFs and the workaround we shipped. - [[Resolved] Issue downloading PDF with Java](https://www.api2pdf.com/resolved-issue-downloading-pdf-with-java): Java code that downloads the PDF returned by Api2Pdf and saves it locally without corrupting the file, using Apache HttpClient. - [[Resolved] PDF is rendering blank or only partially with Headless Chrome](https://www.api2pdf.com/resolved-pdf-is-rendering-blank-or-only-partially-with-headless-chrome): Blank or half-rendered PDFs usually mean javascript had not finished, assets were blocked, or lazy loading. The causes and the delay and waitFor fixes. - [[Solved] Bootstrap striped table not printing to PDF](https://www.api2pdf.com/solved-bootstrap-striped-table-not-printing-to-pdf): Browsers drop background colors when printing. Add -webkit-print-color-adjust: exact so Bootstrap striped rows and other backgrounds appear in the PDF. - [[Solved] Troubleshooting rendering issues with HTML to PDF](https://www.api2pdf.com/solved-troubleshooting-rendering-issues-with-html-to-pdf): A repeatable way to debug a PDF that does not look like your HTML: save the HTML, open it in Chrome, use print preview and the emulate-print option. - [[Resolved] Bad kerning with wkhtmltopdf rendering of html](https://www.api2pdf.com/resolved-bad-kerning-with-wkhtmltopdf-rendering-of-html): wkhtmltopdf spaces letters incorrectly with some fonts such as Roboto. The font-format and engine choices that resolve the kerning problem. - [[Solved] Error – Couldn’t connect to server localhost](https://www.api2pdf.com/solved-error-couldnt-connect-to-server): Api2Pdf runs in the cloud and cannot reach localhost. Send the HTML directly, or make the page reachable on a public URL, when converting URLs to PDF. - [[Solved] Headless Chrome options ignoring landscape mode when printing to pdf](https://www.api2pdf.com/solved-headless-chrome-options-ignoring-landscape-mode-when-printing-to-pdf): A page's own @page CSS size rule overrides the landscape option in Headless Chrome. How we found it and the preferCSSPageSize fix. - [[Solved] Accessing a secure page with a URL endpoint](https://www.api2pdf.com/solved-accessing-a-secure-page-with-a-url-endpoint): The URL-to-PDF endpoint cannot sign in to your app. Options: render the HTML server side and send it, or expose the page with a signed, expiring token. - [[Solved] Access denied | v2018.api2pdf.com used Cloudflare to restrict access](https://www.api2pdf.com/solved-access-denied-v2018-api2pdf-com-used-cloudflare-to-restrict-access): Getting 'Access denied | v2018.api2pdf.com used Cloudflare to restrict access'? Your HTTP client is missing a User-Agent header. Here is the fix. - All 16 posts: https://www.api2pdf.com/blog/troubleshooting ### Engineering - [Post Mortem – Ensuring High Availability on Azure Functions](https://www.api2pdf.com/post-mortem-ensuring-high-availability-on-azure-functions): A three minute outage on May 15, 2019, what caused it on Azure Functions, and the redundancy we added so a single region failure does not stop PDF generation. - [Tackling API2PDF’s technical and business challenges with Azure Table Storage and Data Lake Analytics](https://www.api2pdf.com/tackling-api2pdfs-technical-and-business-challenges-with-azure-table-storage-and-data-lake-analytics): How Api2Pdf stores a permanent log of every API call in Azure Table Storage and uses Data Lake Analytics for growth metrics and accounting. - [Optimizing Azure Functions to avoid the 300 connection limit](https://www.api2pdf.com/optimizing-azure-functions-to-avoid-the-300-connection-limit): How Api2Pdf hit the 300 outbound connection limit on Azure Functions, and the HttpClient and architecture changes that fixed it. - [The journey of migrating PDF generation to a serverless architecture](https://www.api2pdf.com/the-journey-of-migrating-pdf-generation-to-a-serverless-architecture): Why and how Api2Pdf moved wkhtmltopdf, Headless Chrome and LibreOffice onto AWS Lambda, and what it did to cost, scale and reliability. - [Debugging Amazon S3, Lambda, Timeouts, ContentOperationNotPermitted, wkhtmltopdf, and Headless Chrome](https://www.api2pdf.com/a-debugging-story-amazon-s3-lambda-timeouts-contentoperationnotpermitted-wkhtmltopdf-headless-chrome): A debugging story from the Api2Pdf backend: AWS Lambda timeouts, S3 and the ContentOperationNotPermitted error in wkhtmltopdf and Headless Chrome. - [WKHTMLTOPDF vs Headless Chrome – PDF Size Comparison](https://www.api2pdf.com/wkhtmltopdf-vs-headless-chrome-pdf-size-comparison): We rendered identical HTML with wkhtmltopdf and Headless Chrome and compared file size, render time and cost to find out when each engine is cheaper. ### Alternatives - [domPDF Alternative for PHP](https://www.api2pdf.com/dompdf-alternative-for-php): dompdf supports CSS 2.1 and little else. Render modern HTML and CSS to PDF from PHP with Headless Chrome or wkhtmltopdf through the Api2Pdf REST API. - [jsPDF Alternative for PDF Generation](https://www.api2pdf.com/jspdf-alternative-for-pdf-generation): jsPDF builds PDFs by hand in the browser and struggles with real HTML. Convert HTML to PDF with a browser engine through a REST API instead. - [IronPDF Alternative for PDF Generation in C# and .NET](https://www.api2pdf.com/ironpdf-alternative-for-pdf-generation-in-c-and-net): IronPDF is a per-developer licence. Api2Pdf converts HTML, URLs and Office files to PDF from .NET through a pay-as-you-go REST API with no server to run. - [Aspose Alternative to PDF Generation](https://www.api2pdf.com/aspose-alternative-to-pdf-generation): Aspose.PDF is powerful but expensive. For generating PDFs from HTML, URLs and Office files, a pay-as-you-go REST API is a cheaper alternative. - [Crystal Reports Alternative for PDF generation](https://www.api2pdf.com/crystal-reports-alternative-for-pdf-generation): Replace Crystal Reports for PDF output: build the report in HTML with your data and convert it to PDF with Headless Chrome through a REST API. - [ActivePDF Alternative for PDF Generation](https://www.api2pdf.com/activepdf-alternative-for-pdf-generation): An alternative to ActivePDF for .NET developers: convert HTML, URLs and Office documents to PDF, merge and manipulate PDFs through a REST API. - [Best free PrinceXML alternative – Headless Chrome](https://www.api2pdf.com/best-free-princexml-alternative-headless-chrome): PrinceXML costs thousands per server. Headless Chrome renders modern HTML and CSS to PDF for free, and Api2Pdf runs it for you as a pay-as-you-go API. - [ReportLab Alternative for PDF generation in Python](https://www.api2pdf.com/reportlab-alternative-for-pdf-generation-in-python): ReportLab builds PDFs by hand. Write HTML and CSS instead and convert it from Python with Headless Chrome or wkhtmltopdf through the Api2Pdf REST API. - [FPDF Alternative for PHP for Generating PDFs](https://www.api2pdf.com/fpdf-alternative-for-php-for-generating-pdfs): FPDF makes you build PDFs by hand in PHP. Design the document in HTML and CSS and convert it with Headless Chrome or wkhtmltopdf through a REST API instead. - [TCPDF Alternative for PHP](https://www.api2pdf.com/tcpdf-alternative-for-php): TCPDF is free but struggles with modern CSS. Render HTML to PDF from PHP with real browser engines (Headless Chrome, wkhtmltopdf) through a REST API. - [iTextSharp Alternative for Converting HTML to PDF in C# and Java](https://www.api2pdf.com/itextsharp-alternative-for-converting-html-to-pdf-in-csharp-java): iText's AGPL licence makes it costly for commercial apps. Convert HTML to PDF in C# and Java with Headless Chrome or wkhtmltopdf through a REST API instead. ### Integrations - [Generate PDFs from Salesforce Apex](https://www.api2pdf.com/generate-pdfs-from-salesforce-apex): Convert HTML and URLs to PDF from Salesforce Apex with the Api2Pdf REST API. Sample Apex code and documentation on GitHub. - [Save a Web Page as PDF – WordPress Plugin](https://www.api2pdf.com/save-a-web-page-as-pdf-wordpress-plugin): The Api2Pdf WordPress plugin adds a Save to PDF button to any page or post and converts it with Headless Chrome. Installation and setup. - [CKEditor Save to PDF Plugin](https://www.api2pdf.com/ckeditor-save-to-pdf-plugin): An open source CKEditor 4 plugin that adds a Save to PDF button and converts the editor content with Api2Pdf. Demo and setup on GitHub. - [tinyMCE Save to PDF Plugin](https://www.api2pdf.com/tinymce-save-to-pdf-plugin): An open source TinyMCE plugin that adds a Save to PDF button to the editor and converts the document with Api2Pdf. Demo and setup included. - [Generate Custom PDFs from HTML with ScriptCase and Api2Pdf](https://www.api2pdf.com/generate-custom-pdfs-from-html-with-scriptcase-and-api2pdf): Go beyond ScriptCase's built-in PDF export: design the layout in HTML and convert it with the Api2Pdf REST API from your ScriptCase PHP application. - [MuleSoft – Convert HTML, URLs, and Office Docs to PDF with MuleSoft](https://www.api2pdf.com/mulesoft-convert-html-urls-and-office-docs-to-pdf-with-mulesoft): A walk-through of calling the Api2Pdf REST API from MuleSoft Anypoint to generate PDFs from HTML, URLs and Office documents inside an integration flow. - [IFTTT – Save any Pocket article as PDF and Email it as Attachment](https://www.api2pdf.com/ifttt-save-any-pocket-article-as-pdf-and-email-it-as-attachment): Use IFTTT with Api2Pdf to convert every article you save to Pocket into a PDF and email it to yourself as an attachment automatically. - [IFTTT – Convert a URL to PDF and Email PDF as Attachment](https://www.api2pdf.com/ifttt-convert-a-url-to-pdf-and-email-pdf-as-attachment): Step by step: use IFTTT and the Api2Pdf URL-to-PDF endpoint to turn any web page into a PDF and email it as an attachment, no code required. ### Company - [New website launched!](https://www.api2pdf.com/Hello-World): api2pdf.com moved from WordPress on WP Engine to Raytha, the open source .NET CMS built by the same team. Why we switched and what changed. - [1000 Paying Businesses Milestone!](https://www.api2pdf.com/1000-paying-businesses-milestone): Api2Pdf reaches 1,000 paying businesses three years after launch. Thank you to every customer who has been part of the journey. - [Virtual conferences are on the rise](https://www.api2pdf.com/virtual-conferences-are-on-the-rise): Notes from DockerCon Live 2020 and why virtual conferences, and the technology behind them, are here to stay. - [API2PDF and GDPR compliance](https://www.api2pdf.com/api2pdf-and-gdpr-compliance): Api2Pdf does not log payloads, deletes files after 24 hours (or immediately on request) and can upload straight to your storage. How that fits GDPR. - [Celebrating one year and tentative roadmap for the future of the API2PDF product](https://www.api2pdf.com/celebrating-one-year-and-tentative-roadmap-for-the-future-of-the-api2pdf-product): Founder Zack Schwartz looks back on the first year of Api2Pdf, the first paying customer, and shares the tentative roadmap, including v2. - [Web service to convert HTML + CSS to PDF](https://www.api2pdf.com/web-service-to-convert-html-css-to-pdf): Api2Pdf is a serverless web service that converts HTML and CSS to PDF at scale with Headless Chrome and wkhtmltopdf, with pay-as-you-go pricing. - [API2PDF and HIPAA Compliance for PDF Generation](https://www.api2pdf.com/api2pdf-and-hipaa-compliance-for-pdf-generation): What Api2Pdf stores, for how long, and how the delete-on-command and no-logging design fit into a HIPAA-compliant PDF generation workflow. - [Api2Pdf joins the RapidApi Platform to make it easy to test and deploy your PDF generation](https://www.api2pdf.com/api2pdf-joins-the-rapidapi-platform-to-make-it-easy-to-test-and-deploy-your-pdf-generation): Api2Pdf is now listed on RapidAPI, so you can test HTML-to-PDF, URL-to-PDF and Office conversion calls in the browser and deploy from one dashboard. ## Optional - [Full site content as one text file](https://www.api2pdf.com/llms-full.txt): every page and post in Markdown - [OpenAPI / Swagger reference](https://v2.api2pdf.com/swagger/index.html) - [Sitemap](https://www.api2pdf.com/sitemap.xml) - [RSS feed](https://www.api2pdf.com/rss.xml) - [GitHub](https://github.com/Api2Pdf): client libraries and examples