[{"data":1,"prerenderedAt":1070},["Reactive",2],{"/guides/best-pdf-generation-apis":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"dateModified":10,"author":11,"body":12,"_type":1065,"_id":1066,"_source":1067,"_file":1068,"_extension":1069},"/guides/best-pdf-generation-apis","guides",false,"","Best PDF Generation APIs, From Our Own Test Runs","Which PDF generation API should you pick? What came back when we sent our test pages to DocRaptor, Gotenberg, Browserless, PDF.co and others, next to PDFShift.","2026-12-02","Cyril Nicodème",{"type":13,"children":14,"toc":1054},"root",[15,23,30,32,277,282,360,366,371,381,422,440,450,456,461,529,534,546,552,557,628,633,639,644,677,703,729,780,786,791,937,943,948,961,967,998,1041],{"type":16,"tag":17,"props":18,"children":19},"element","p",{},[20],{"type":21,"value":22},"text","Every test page that broke in our runs broke on Prince, the engine inside DocRaptor. So pick an API that runs Chromium, and the only question left is who runs the browser. With PDFShift, we do: you send one POST, and the PDF comes straight back. Between November 11 and 28, 2026, we sent the same test pages (a 75-row invoice, a page with a CSS grid and a script, a page that draws a Chart.js chart) to seven other APIs and engines, each next to PDFShift.",{"type":16,"tag":24,"props":25,"children":27},"h2",{"id":26},"what-came-back-when-we-sent-our-test-pages-to-each-api",[28],{"type":21,"value":29},"What came back when we sent our test pages to each API?",{"type":21,"value":31},"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",{"type":16,"tag":33,"props":34,"children":35},"table",{},[36,65],{"type":16,"tag":37,"props":38,"children":39},"thead",{},[40],{"type":16,"tag":41,"props":42,"children":43},"tr",{},[44,50,55,60],{"type":16,"tag":45,"props":46,"children":47},"th",{},[48],{"type":21,"value":49},"API",{"type":16,"tag":45,"props":51,"children":52},{},[53],{"type":21,"value":54},"Engine",{"type":16,"tag":45,"props":56,"children":57},{},[58],{"type":21,"value":59},"Document we sent",{"type":16,"tag":45,"props":61,"children":62},{},[63],{"type":21,"value":64},"What came back",{"type":16,"tag":66,"props":67,"children":68},"tbody",{},[69,106,138,169,190,213,235,256],{"type":16,"tag":41,"props":70,"children":71},{},[72,82,90,98],{"type":16,"tag":73,"props":74,"children":75},"td",{},[76],{"type":16,"tag":77,"props":78,"children":79},"strong",{},[80],{"type":21,"value":81},"PDFShift",{"type":16,"tag":73,"props":83,"children":84},{},[85],{"type":16,"tag":77,"props":86,"children":87},{},[88],{"type":21,"value":89},"Chromium",{"type":16,"tag":73,"props":91,"children":92},{},[93],{"type":16,"tag":77,"props":94,"children":95},{},[96],{"type":21,"value":97},"All of them",{"type":16,"tag":73,"props":99,"children":100},{},[101],{"type":16,"tag":77,"props":102,"children":103},{},[104],{"type":21,"value":105},"Grid, script and chart drawn; invoice in 3 pages with header and \"Page N of M\" footer",{"type":16,"tag":41,"props":107,"children":108},{},[109,114,119,124],{"type":16,"tag":73,"props":110,"children":111},{},[112],{"type":21,"value":113},"DocRaptor (Nov 11)",{"type":16,"tag":73,"props":115,"children":116},{},[117],{"type":21,"value":118},"Prince 15.1",{"type":16,"tag":73,"props":120,"children":121},{},[122],{"type":21,"value":123},"Grid and script page",{"type":16,"tag":73,"props":125,"children":126},{},[127,129,136],{"type":21,"value":128},"The 3-column grid stacked into one column. The script didn't run (JavaScript is off by default), and with ",{"type":16,"tag":130,"props":131,"children":133},"code",{"className":132},[],[134],{"type":21,"value":135},"javascript: true",{"type":21,"value":137}," the request failed with a 422 on an arrow function",{"type":16,"tag":41,"props":139,"children":140},{},[141,146,151,156],{"type":16,"tag":73,"props":142,"children":143},{},[144],{"type":21,"value":145},"Prince 17 (Nov 18)",{"type":16,"tag":73,"props":147,"children":148},{},[149],{"type":21,"value":150},"Prince 17",{"type":16,"tag":73,"props":152,"children":153},{},[154],{"type":21,"value":155},"Grid page, then a chart page",{"type":16,"tag":73,"props":157,"children":158},{},[159,161,167],{"type":21,"value":160},"Grid, flexbox and print styles printed. On the chart page, ",{"type":16,"tag":130,"props":162,"children":164},{"className":163},[],[165],{"type":21,"value":166},"fetch()",{"type":21,"value":168}," and measuring a box didn't run and Chart.js didn't load, so the chart stayed blank",{"type":16,"tag":41,"props":170,"children":171},{},[172,177,181,185],{"type":16,"tag":73,"props":173,"children":174},{},[175],{"type":21,"value":176},"Gotenberg (Nov 14)",{"type":16,"tag":73,"props":178,"children":179},{},[180],{"type":21,"value":89},{"type":16,"tag":73,"props":182,"children":183},{},[184],{"type":21,"value":123},{"type":16,"tag":73,"props":186,"children":187},{},[188],{"type":21,"value":189},"Grid and script printed like ours, on the public demo",{"type":16,"tag":41,"props":191,"children":192},{},[193,198,203,208],{"type":16,"tag":73,"props":194,"children":195},{},[196],{"type":21,"value":197},"PDFCrowd (Nov 15)",{"type":16,"tag":73,"props":199,"children":200},{},[201],{"type":21,"value":202},"Not named",{"type":16,"tag":73,"props":204,"children":205},{},[206],{"type":21,"value":207},"Invoice",{"type":16,"tag":73,"props":209,"children":210},{},[211],{"type":21,"value":212},"Printed smaller than ours: its default margin and wider viewport shrink the page",{"type":16,"tag":41,"props":214,"children":215},{},[216,221,225,230],{"type":16,"tag":73,"props":217,"children":218},{},[219],{"type":21,"value":220},"Cloudflare Browser Run (Nov 16)",{"type":16,"tag":73,"props":222,"children":223},{},[224],{"type":21,"value":89},{"type":16,"tag":73,"props":226,"children":227},{},[228],{"type":21,"value":229},"75-row invoice",{"type":16,"tag":73,"props":231,"children":232},{},[233],{"type":21,"value":234},"3 pages, 33 rows on page 1, same as ours",{"type":16,"tag":41,"props":236,"children":237},{},[238,243,247,251],{"type":16,"tag":73,"props":239,"children":240},{},[241],{"type":21,"value":242},"Browserless (Nov 23)",{"type":16,"tag":73,"props":244,"children":245},{},[246],{"type":21,"value":89},{"type":16,"tag":73,"props":248,"children":249},{},[250],{"type":21,"value":229},{"type":16,"tag":73,"props":252,"children":253},{},[254],{"type":21,"value":255},"3 pages, 33 rows on page 1, 178,134 bytes against our 82,037",{"type":16,"tag":41,"props":257,"children":258},{},[259,264,268,272],{"type":16,"tag":73,"props":260,"children":261},{},[262],{"type":21,"value":263},"PDF.co (Nov 28)",{"type":16,"tag":73,"props":265,"children":266},{},[267],{"type":21,"value":202},{"type":16,"tag":73,"props":269,"children":270},{},[271],{"type":21,"value":229},{"type":16,"tag":73,"props":273,"children":274},{},[275],{"type":21,"value":276},"Same 3 pages and rows as ours",{"type":16,"tag":17,"props":278,"children":279},{},[280],{"type":21,"value":281},"Prince 17 isn't an API. It's the engine's newest version. DocRaptor still defaults to Prince 15.1, so we ran 17 ourselves. The newer Prince printed the grid, but not the chart.",{"type":16,"tag":283,"props":284,"children":286},"figure",{"style":285},"margin:1.5rem 0",[287,353],{"type":16,"tag":288,"props":289,"children":291},"div",{"style":290},"display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px",[292,313,326,340],{"type":16,"tag":288,"props":293,"children":294},{},[295,305],{"type":16,"tag":296,"props":297,"children":304},"img",{"src":298,"width":299,"height":300,"alt":301,"loading":302,"style":303},"/images/guides/best-pdf-apis-invoice-ps.webp",600,849,"Page 1 of invoice INV-2026-0042 from PDFShift: a header line, the invoice title, a table with rows 1 to 33 and the footer Page 1 of 3","lazy","display:block;width:100%;height:auto;border:1px solid #DBE4F2;border-radius:8px",[],{"type":16,"tag":17,"props":306,"children":308},{"style":307},"margin:.4rem 0 0;font-size:.875rem;text-align:center",[309],{"type":16,"tag":77,"props":310,"children":311},{},[312],{"type":21,"value":81},{"type":16,"tag":288,"props":314,"children":315},{},[316,321],{"type":16,"tag":296,"props":317,"children":320},{"src":318,"width":299,"height":300,"alt":319,"loading":302,"style":303},"/images/guides/best-pdf-apis-invoice-cf.webp","Page 1 of the same invoice from Cloudflare Browser Run: the same header line, title, rows 1 to 33 and the footer Page 1 of 3",[],{"type":16,"tag":17,"props":322,"children":323},{"style":307},[324],{"type":21,"value":325},"Cloudflare Browser Run",{"type":16,"tag":288,"props":327,"children":328},{},[329,335],{"type":16,"tag":296,"props":330,"children":334},{"src":331,"width":299,"height":332,"alt":333,"loading":302,"style":303},"/images/guides/best-pdf-apis-invoice-bl.webp",848,"Page 1 of the same invoice from Browserless: the same header line, title, rows 1 to 33 and the footer Page 1 of 3",[],{"type":16,"tag":17,"props":336,"children":337},{"style":307},[338],{"type":21,"value":339},"Browserless",{"type":16,"tag":288,"props":341,"children":342},{},[343,348],{"type":16,"tag":296,"props":344,"children":347},{"src":345,"width":299,"height":300,"alt":346,"loading":302,"style":303},"/images/guides/best-pdf-apis-invoice-pc.webp","Page 1 of the same invoice from PDF.co: the same header line in a monospace font, title, rows 1 to 33 and the footer Page 1 of 3",[],{"type":16,"tag":17,"props":349,"children":350},{"style":307},[351],{"type":21,"value":352},"PDF.co",{"type":16,"tag":354,"props":355,"children":357},"figcaption",{"style":356},"margin-top:.5rem;font-size:.875rem;color:#4C556D",[358],{"type":21,"value":359},"Page 1 of the same 75-row invoice from four APIs (November 16 to December 2, 2026). Each one is a 3-page A4 PDF with 33 rows on page 1.",{"type":16,"tag":24,"props":361,"children":363},{"id":362},"which-engine-will-render-your-html",[364],{"type":21,"value":365},"Which engine will render your HTML?",{"type":16,"tag":17,"props":367,"children":368},{},[369],{"type":21,"value":370},"If you check your templates in Chrome, print them with Chromium. That's PDFShift, and it's also Gotenberg, Browserless and Cloudflare Browser Run.",{"type":16,"tag":17,"props":372,"children":373},{},[374,379],{"type":16,"tag":77,"props":375,"children":376},{},[377],{"type":21,"value":378},"Prince (DocRaptor).",{"type":21,"value":380}," Prince is a print engine for documents meant to be printed, and it doesn't run JavaScript unless you turn it on. If your documents are HTML your app already shows in a browser, you'll be checking every template twice: once in Chrome, once in Prince.",{"type":16,"tag":283,"props":382,"children":383},{"style":285},[384,417],{"type":16,"tag":288,"props":385,"children":387},{"style":386},"display:grid;grid-template-columns:1fr 1fr;gap:12px",[388,405],{"type":16,"tag":288,"props":389,"children":390},{},[391,398],{"type":16,"tag":296,"props":392,"children":397},{"src":393,"width":394,"height":395,"alt":396,"loading":302,"style":303},"/images/guides/best-pdf-apis-chart-pdfshift.webp",700,906,"The same chart test page from PDFShift: the four checks ran and the Chart.js chart is drawn",[],{"type":16,"tag":17,"props":399,"children":400},{"style":307},[401],{"type":16,"tag":77,"props":402,"children":403},{},[404],{"type":21,"value":81},{"type":16,"tag":288,"props":406,"children":407},{},[408,413],{"type":16,"tag":296,"props":409,"children":412},{"src":410,"width":394,"height":395,"alt":411,"loading":302,"style":303},"/images/guides/best-pdf-apis-chart-prince17.webp","The chart test page as Prince 17 printed it: the heading Browser features test and four lines, TIMER-RAN, FETCH-NOT-RUN, MEASURE-NOT-RUN, CHARTJS-NOT-LOADED, and no chart",[],{"type":16,"tag":17,"props":414,"children":415},{"style":307},[416],{"type":21,"value":150},{"type":16,"tag":354,"props":418,"children":419},{"style":356},[420],{"type":21,"value":421},"The same chart test page from Prince 17 (November 18, 2026) and PDFShift (December 2, 2026). Each line on the page reports whether one browser feature ran.",{"type":16,"tag":17,"props":423,"children":424},{},[425,430,432,438],{"type":16,"tag":77,"props":426,"children":427},{},[428],{"type":21,"value":429},"An older Chrome (Api2Pdf).",{"type":21,"value":431}," Api2Pdf runs Chrome 130 in production. Chrome added ",{"type":16,"tag":130,"props":433,"children":435},{"className":434},[],[436],{"type":21,"value":437},"@page",{"type":21,"value":439}," margin boxes, the CSS way to put headers and page numbers in your print stylesheet, in Chrome 131. On Api2Pdf you'd build those with its header and footer template options instead. It also still offers wkhtmltopdf, an engine whose GitHub project was archived in 2023.",{"type":16,"tag":17,"props":441,"children":442},{},[443,448],{"type":16,"tag":77,"props":444,"children":445},{},[446],{"type":21,"value":447},"Engine not named.",{"type":21,"value":449}," PDFCrowd, PDF.co and Nutrient don't say what renders your HTML. Nutrient sells a document platform, and HTML to PDF is one of many operations in its DWS Processor API.",{"type":16,"tag":24,"props":451,"children":453},{"id":452},"do-you-want-to-run-the-browser-yourself",[454],{"type":21,"value":455},"Do you want to run the browser yourself?",{"type":16,"tag":17,"props":457,"children":458},{},[459],{"type":21,"value":460},"Running Chromium is the work: memory, crashes, fonts, updates and the server it sits on. We've run it for other people's PDFs since 2018, and the short version is this: people don't buy PDFs. They buy not having to run Chromium.",{"type":16,"tag":462,"props":463,"children":464},"ul",{},[465,476,501,510],{"type":16,"tag":466,"props":467,"children":468},"li",{},[469,474],{"type":16,"tag":77,"props":470,"children":471},{},[472],{"type":21,"value":473},"Gotenberg",{"type":21,"value":475}," ships as a Docker image you run. It's free software, so the bill is the server: about $47 a month for one always-on Google Cloud Run instance in Iowa with 1 vCPU and Gotenberg's 1 GiB memory minimum, after Google's free tier and before traffic and before the time someone spends patching it.",{"type":16,"tag":466,"props":477,"children":478},{},[479,483,485,491,493,499],{"type":16,"tag":77,"props":480,"children":481},{},[482],{"type":21,"value":339},{"type":21,"value":484}," hosts the browser, and you drive it. Its ",{"type":16,"tag":130,"props":486,"children":488},{"className":487},[],[489],{"type":21,"value":490},"/pdf",{"type":21,"value":492}," endpoint takes Puppeteer's ",{"type":16,"tag":130,"props":494,"children":496},{"className":495},[],[497],{"type":21,"value":498},"page.pdf()",{"type":21,"value":500}," options and uses Chrome's print engine, so you still tune Chrome's print options, just on someone else's machine.",{"type":16,"tag":466,"props":502,"children":503},{},[504,508],{"type":16,"tag":77,"props":505,"children":506},{},[507],{"type":21,"value":325},{"type":21,"value":509}," gives you a hosted browser you call from a Cloudflare Worker or its REST API. Workers Free includes 10 minutes of browser time a day.",{"type":16,"tag":466,"props":511,"children":512},{},[513,518,520,527],{"type":16,"tag":77,"props":514,"children":515},{},[516],{"type":21,"value":517},"Puppeteer or Playwright",{"type":21,"value":519}," on your own servers is the do-it-all-yourself version. Our ",{"type":16,"tag":521,"props":522,"children":524},"a",{"href":523},"/alternatives/puppeteer/",[525],{"type":21,"value":526},"Puppeteer alternative page",{"type":21,"value":528}," covers what moving off it looks like.",{"type":16,"tag":17,"props":530,"children":531},{},[532],{"type":21,"value":533},"With PDFShift there's nothing to host or patch. Chromium runs on our servers in France, and this is the whole call:",{"type":16,"tag":535,"props":536,"children":541},"pre",{"className":537,"code":539,"language":540,"meta":7},[538],"language-bash","curl https://api.pdfshift.io/v3/convert/pdf \\\n  -H 'X-API-Key: sk_your_api_key' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"source\": \"https://example.com/invoice/1042\", \"use_print\": true}' \\\n  -o invoice-1042.pdf\n","bash",[542],{"type":16,"tag":130,"props":543,"children":544},{"__ignoreMap":7},[545],{"type":21,"value":539},{"type":16,"tag":24,"props":547,"children":549},{"id":548},"should-your-template-live-in-your-code-or-in-a-vendors-editor",[550],{"type":21,"value":551},"Should your template live in your code or in a vendor's editor?",{"type":16,"tag":17,"props":553,"children":554},{},[555],{"type":21,"value":556},"A second group of APIs has you build the template in their editor or in a Word or Google Docs file, then send JSON to fill it in.",{"type":16,"tag":462,"props":558,"children":559},{},[560,578,588,598,608,618],{"type":16,"tag":466,"props":561,"children":562},{},[563,568,570,576],{"type":16,"tag":77,"props":564,"children":565},{},[566],{"type":21,"value":567},"PDFMonkey",{"type":21,"value":569}," templates are HTML and CSS with Liquid tags, kept in its app. Generation is asynchronous: you poll or take a webhook. Its free plan covers 20 documents a month. If you're leaving it, our ",{"type":16,"tag":521,"props":571,"children":573},{"href":572},"/alternatives/pdfmonkey/",[574],{"type":21,"value":575},"PDFMonkey alternative page",{"type":21,"value":577}," shows how a Liquid template moves into your own code.",{"type":16,"tag":466,"props":579,"children":580},{},[581,586],{"type":16,"tag":77,"props":582,"children":583},{},[584],{"type":21,"value":585},"CraftMyPDF",{"type":21,"value":587}," has a drag-and-drop editor and a REST API, with 50 PDFs a month and 3 templates on its free plan.",{"type":16,"tag":466,"props":589,"children":590},{},[591,596],{"type":16,"tag":77,"props":592,"children":593},{},[594],{"type":21,"value":595},"APITemplate.io",{"type":21,"value":597}," has a visual editor and an HTML editor. Its free plan covers 50 PDFs a month and 3 templates, and async generation with webhooks starts on its paid plans.",{"type":16,"tag":466,"props":599,"children":600},{},[601,606],{"type":16,"tag":77,"props":602,"children":603},{},[604],{"type":21,"value":605},"PDF Generator API",{"type":21,"value":607}," builds documents in its own template editor, with a 14-day trial. Its Creator plan is €80 a year.",{"type":16,"tag":466,"props":609,"children":610},{},[611,616],{"type":16,"tag":77,"props":612,"children":613},{},[614],{"type":21,"value":615},"Carbone",{"type":21,"value":617}," fills Word, Excel, PowerPoint or LibreOffice templates with JSON, with 100 documents a month free.",{"type":16,"tag":466,"props":619,"children":620},{},[621,626],{"type":16,"tag":77,"props":622,"children":623},{},[624],{"type":21,"value":625},"DocsAutomator",{"type":21,"value":627}," fills Google Docs and Word templates, from no-code tools or its API.",{"type":16,"tag":17,"props":629,"children":630},{},[631],{"type":21,"value":632},"If your app already renders the document as HTML, these mean moving every template out of your code, and they're a different way of working, not a better engine for it. Stick with HTML and your templates stay in your repository, reviewed and versioned with the code that fills them. The API only has to print them.",{"type":16,"tag":24,"props":634,"children":636},{"id":635},"what-changes-when-you-move-a-template-to-pdfshift",[637],{"type":21,"value":638},"What changes when you move a template to PDFShift?",{"type":16,"tag":17,"props":640,"children":641},{},[642],{"type":21,"value":643},"Most of the work in switching APIs is in the defaults, not the code. Three of them can change the result without any error.",{"type":16,"tag":17,"props":645,"children":646},{},[647,652,654,659,661,667,669,675],{"type":16,"tag":77,"props":648,"children":649},{},[650],{"type":21,"value":651},"Print or screen CSS.",{"type":21,"value":653}," DocRaptor and PDF.co print with your print stylesheet by default, and so does Chrome's ",{"type":16,"tag":130,"props":655,"children":657},{"className":656},[],[658],{"type":21,"value":498},{"type":21,"value":660},", which Browserless and Puppeteer call. PDFShift renders with screen CSS unless you add ",{"type":16,"tag":130,"props":662,"children":664},{"className":663},[],[665],{"type":21,"value":666},"\"use_print\": true",{"type":21,"value":668},". If your template has an ",{"type":16,"tag":130,"props":670,"children":672},{"className":671},[],[673],{"type":21,"value":674},"@media print",{"type":21,"value":676}," block, add that one parameter and the PDF matches what you had.",{"type":16,"tag":17,"props":678,"children":679},{},[680,685,687,693,695,701],{"type":16,"tag":77,"props":681,"children":682},{},[683],{"type":21,"value":684},"Paper size and margins.",{"type":21,"value":686}," Gotenberg defaults to Letter, and PDFShift to A4. PDFCrowd adds a 0.4 in margin on every side by default. Set ",{"type":16,"tag":130,"props":688,"children":690},{"className":689},[],[691],{"type":21,"value":692},"format",{"type":21,"value":694}," and ",{"type":16,"tag":130,"props":696,"children":698},{"className":697},[],[699],{"type":21,"value":700},"margin",{"type":21,"value":702}," in your PDFShift request to the values you had, and the page breaks land where they did before.",{"type":16,"tag":17,"props":704,"children":705},{},[706,711,713,719,721,727],{"type":16,"tag":77,"props":707,"children":708},{},[709],{"type":21,"value":710},"Where the file goes.",{"type":21,"value":712}," PDF.co answers with a link to a file it keeps for 60 minutes by default, and PDFMonkey with a download link valid for 1 hour. PDFShift returns the PDF itself and keeps nothing. If you want a link instead, ",{"type":16,"tag":130,"props":714,"children":716},{"className":715},[],[717],{"type":21,"value":718},"filename",{"type":21,"value":720}," stores it for 2 days, or ",{"type":16,"tag":130,"props":722,"children":724},{"className":723},[],[725],{"type":21,"value":726},"s3_destination",{"type":21,"value":728}," writes it to your own bucket.",{"type":16,"tag":17,"props":730,"children":731},{},[732,734,740,741,747,749,755,756,762,764,770,772,778],{"type":21,"value":733},"Headers and page numbers port too. Our 75-row invoice used the ",{"type":16,"tag":130,"props":735,"children":737},{"className":736},[],[738],{"type":21,"value":739},"header",{"type":21,"value":694},{"type":16,"tag":130,"props":742,"children":744},{"className":743},[],[745],{"type":21,"value":746},"footer",{"type":21,"value":748}," parameters, with ",{"type":16,"tag":130,"props":750,"children":752},{"className":751},[],[753],{"type":21,"value":754},"{{date}}",{"type":21,"value":694},{"type":16,"tag":130,"props":757,"children":759},{"className":758},[],[760],{"type":21,"value":761},"{{title}}",{"type":21,"value":763}," in the header and \"Page ",{"type":16,"tag":130,"props":765,"children":767},{"className":766},[],[768],{"type":21,"value":769},"{{page}}",{"type":21,"value":771}," of ",{"type":16,"tag":130,"props":773,"children":775},{"className":774},[],[776],{"type":21,"value":777},"{{total}}",{"type":21,"value":779},"\" in the footer. If your current API builds headers from HTML snippets with page-number tokens, it's usually a rename of the token, not a redesign.",{"type":16,"tag":24,"props":781,"children":783},{"id":782},"what-else-can-the-same-request-do",[784],{"type":21,"value":785},"What else can the same request do?",{"type":16,"tag":17,"props":787,"children":788},{},[789],{"type":21,"value":790},"Most of what people bolt onto a PDF pipeline after the render is a parameter on the same PDFShift call.",{"type":16,"tag":462,"props":792,"children":793},{},[794,827,869,886,903,927],{"type":16,"tag":466,"props":795,"children":796},{},[797,802,804,809,811,817,819,825],{"type":16,"tag":77,"props":798,"children":799},{},[800],{"type":21,"value":801},"One long page instead of A4 sheets.",{"type":21,"value":803}," Set ",{"type":16,"tag":130,"props":805,"children":807},{"className":806},[],[808],{"type":21,"value":692},{"type":21,"value":810}," to a width and ",{"type":16,"tag":130,"props":812,"children":814},{"className":813},[],[815],{"type":21,"value":816},"auto",{"type":21,"value":818},", like ",{"type":16,"tag":130,"props":820,"children":822},{"className":821},[],[823],{"type":21,"value":824},"\"1024xauto\"",{"type":21,"value":826},", and the PDF is one page as tall as your content. Good for receipts, and for saving a web page as it looks on screen.",{"type":16,"tag":466,"props":828,"children":829},{},[830,835,837,843,845,851,853,859,861,867],{"type":16,"tag":77,"props":831,"children":832},{},[833],{"type":21,"value":834},"A password.",{"type":21,"value":836}," ",{"type":16,"tag":130,"props":838,"children":840},{"className":839},[],[841],{"type":21,"value":842},"protection",{"type":21,"value":844}," takes a ",{"type":16,"tag":130,"props":846,"children":848},{"className":847},[],[849],{"type":21,"value":850},"user_password",{"type":21,"value":852}," and an ",{"type":16,"tag":130,"props":854,"children":856},{"className":855},[],[857],{"type":21,"value":858},"owner_password",{"type":21,"value":860},", and ",{"type":16,"tag":130,"props":862,"children":864},{"className":863},[],[865],{"type":21,"value":866},"no_print",{"type":21,"value":868}," stops the file being printed.",{"type":16,"tag":466,"props":870,"children":871},{},[872,877,878,884],{"type":16,"tag":77,"props":873,"children":874},{},[875],{"type":21,"value":876},"A watermark.",{"type":21,"value":836},{"type":16,"tag":130,"props":879,"children":881},{"className":880},[],[882],{"type":21,"value":883},"watermark",{"type":21,"value":885}," takes text or an image, with its size, color, opacity, position and rotation.",{"type":16,"tag":466,"props":887,"children":888},{},[889,894,895,901],{"type":16,"tag":77,"props":890,"children":891},{},[892],{"type":21,"value":893},"A webhook.",{"type":21,"value":836},{"type":16,"tag":130,"props":896,"children":898},{"className":897},[],[899],{"type":21,"value":900},"webhook",{"type":21,"value":902}," posts the file's URL to your endpoint when it's ready, for batches you don't want to wait on.",{"type":16,"tag":466,"props":904,"children":905},{},[906,911,912,918,919,925],{"type":16,"tag":77,"props":907,"children":908},{},[909],{"type":21,"value":910},"Pages behind a login.",{"type":21,"value":836},{"type":16,"tag":130,"props":913,"children":915},{"className":914},[],[916],{"type":21,"value":917},"http_headers",{"type":21,"value":694},{"type":16,"tag":130,"props":920,"children":922},{"className":921},[],[923],{"type":21,"value":924},"cookies",{"type":21,"value":926}," go with the request when you convert a URL, so a dashboard or an account page prints as the signed-in user sees it.",{"type":16,"tag":466,"props":928,"children":929},{},[930,935],{"type":16,"tag":77,"props":931,"children":932},{},[933],{"type":21,"value":934},"Images too.",{"type":21,"value":936}," The same API returns PNG, JPEG or WebP from the same HTML or URL, and it can capture one area of the page, a single element picked by its CSS selector, or the whole page. That covers social cards, report thumbnails and the preview image next to a PDF download link.",{"type":16,"tag":24,"props":938,"children":940},{"id":939},"how-do-these-apis-bill-a-document",[941],{"type":21,"value":942},"How do these APIs bill a document?",{"type":16,"tag":17,"props":944,"children":945},{},[946],{"type":21,"value":947},"The billing unit decides the bill more than the price list does. A PDFShift credit covers up to 5 MB of output, so a 3-page invoice or a 9-page one is 1 credit. On PDF.co our 3-page invoice cost 27 credits and a 9-page version 81. PDFCrowd charges 1 credit per 0.5 MB of output. CraftMyPDF counts 1 credit per PDF whatever its pages, and Carbone counts per 1 MB of data. Nutrient charges $37.50 per 1,000 HTML-to-PDF operations, after $5 of free usage a month. Api2Pdf bills $1 a month plus bandwidth and seconds of compute.",{"type":16,"tag":17,"props":949,"children":950},{},[951,953,959],{"type":21,"value":952},"PDFShift's free plan is 50 credits a month with no card, and paid plans start at $9 for 500 credits. The ",{"type":16,"tag":521,"props":954,"children":956},{"href":955},"/pdf-generator-api/",[957],{"type":21,"value":958},"PDF generator API page",{"type":21,"value":960}," has our prices next to other APIs from 500 to 500,000 PDFs a month.",{"type":16,"tag":24,"props":962,"children":964},{"id":963},"which-one-should-you-try-first",[965],{"type":21,"value":966},"Which one should you try first?",{"type":16,"tag":17,"props":968,"children":969},{},[970,972,980,982,988,990,996],{"type":21,"value":971},"PDFShift. Our users give us ",{"type":16,"tag":521,"props":973,"children":977},{"href":974,"rel":975},"https://www.capterra.com/p/184246/PDFShift/reviews/",[976],"nofollow",[978],{"type":21,"value":979},"4.8 stars from 65 reviews",{"type":21,"value":981}," on Capterra, but the test that counts is your own template, so send us the hardest one you have: the grid, the chart, the 75-row table. Add ",{"type":16,"tag":130,"props":983,"children":985},{"className":984},[],[986],{"type":21,"value":987},"\"sandbox\": true",{"type":21,"value":989}," and you get a watermarked PDF that uses no credits, or ",{"type":16,"tag":521,"props":991,"children":993},{"href":992},"/register/",[994],{"type":21,"value":995},"sign up for the free plan",{"type":21,"value":997}," and run it for real. Then open the PDF and check four things:",{"type":16,"tag":462,"props":999,"children":1000},{},[1001,1011,1021,1031],{"type":16,"tag":466,"props":1002,"children":1003},{},[1004,1009],{"type":16,"tag":77,"props":1005,"children":1006},{},[1007],{"type":21,"value":1008},"Page breaks.",{"type":21,"value":1010}," Does a table row split across two pages, or a total end up alone at the top of the last one?",{"type":16,"tag":466,"props":1012,"children":1013},{},[1014,1019],{"type":16,"tag":77,"props":1015,"children":1016},{},[1017],{"type":21,"value":1018},"Fonts.",{"type":21,"value":1020}," Is every web font there, or did a fallback font slip in?",{"type":16,"tag":466,"props":1022,"children":1023},{},[1024,1029],{"type":16,"tag":77,"props":1025,"children":1026},{},[1027],{"type":21,"value":1028},"Scripts.",{"type":21,"value":1030}," Did the chart draw and the data load before the page printed?",{"type":16,"tag":466,"props":1032,"children":1033},{},[1034,1039],{"type":16,"tag":77,"props":1035,"children":1036},{},[1037],{"type":21,"value":1038},"Headers and footers.",{"type":21,"value":1040}," Do they show on every page, with the right page numbers?",{"type":16,"tag":17,"props":1042,"children":1043},{},[1044,1046,1052],{"type":21,"value":1045},"If an AI agent will be making the PDFs, read our ",{"type":16,"tag":521,"props":1047,"children":1049},{"href":1048},"/guides/best-pdf-api-for-ai-agents/",[1050],{"type":21,"value":1051},"list of PDF APIs an AI agent can call",{"type":21,"value":1053},".",{"title":7,"searchDepth":1055,"depth":1055,"links":1056},2,[1057,1058,1059,1060,1061,1062,1063,1064],{"id":26,"depth":1055,"text":29},{"id":362,"depth":1055,"text":365},{"id":452,"depth":1055,"text":455},{"id":548,"depth":1055,"text":551},{"id":635,"depth":1055,"text":638},{"id":782,"depth":1055,"text":785},{"id":939,"depth":1055,"text":942},{"id":963,"depth":1055,"text":966},"markdown","content:guides:best-pdf-generation-apis.md","content","guides/best-pdf-generation-apis.md","md",1796486664780]