[{"data":1,"prerenderedAt":816},["Reactive",2],{"/guides/curl/using-cookies":3},[4,60,98,137,175,213,252,290,327,364,401,440,478,517,555,592,630,668,705,742,779],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"language":11,"library":11,"property":12,"output":13,"related":14,"body":16,"_type":55,"_id":56,"_source":57,"_file":58,"_extension":59},"/guides/curl/accessing-secured-pages","curl",false,"","Accessing secured pages","Learn how to access secured pages when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.","cUrl","source","pdf",[15],"convert-html-to-pdf-from-a-url",{"type":17,"children":18,"toc":52},"root",[19,27,40,45],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":26},"text","In this guide, we'll show you how to access secured pages when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":29,"children":34},"pre",{"code":30,"language":31,"meta":8,"className":32},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Access a secured page\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com/secured\", \"auth\": {\"username\": \"user\", \"password\": \"pass\"}}' \\\n  -o \"result.pdf\"\n","bash",[33],"language-bash",[35],{"type":20,"tag":36,"props":37,"children":38},"code",{"__ignoreMap":8},[39],{"type":25,"value":30},{"type":20,"tag":21,"props":41,"children":42},{},[43],{"type":25,"value":44},"With this cUrl command, you can access secured pages by providing authentication credentials. Happy coding!",{"type":20,"tag":28,"props":46,"children":47},{"code":8},[48],{"type":20,"tag":36,"props":49,"children":50},{"__ignoreMap":8},[51],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":54},2,[],"markdown","content:guides:curl:accessing-secured-pages.md","content","guides/curl/accessing-secured-pages.md","md",{"_path":61,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":62,"description":63,"language":11,"library":11,"property":64,"output":13,"related":65,"body":66,"_type":55,"_id":96,"_source":57,"_file":97,"_extension":59},"/guides/curl/adding-a-custom-header-or-footer","Adding a custom header or footer","Learn how to add custom headers and footers to your PDF documents when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.","header",[15],{"type":17,"children":67,"toc":94},[68,73,82,87],{"type":20,"tag":21,"props":69,"children":70},{},[71],{"type":25,"value":72},"In this guide, we'll show you how to add custom headers and footers to your PDF documents when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":74,"children":77},{"code":75,"language":31,"meta":8,"className":76},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Add a custom header and footer\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"header\": {\"html\": \"\u003Cdiv style=\\\"text-align: center;\\\">Page Header\u003C/div>\"}, \"footer\": {\"html\": \"\u003Cdiv style=\\\"text-align: center;\\\">Page Footer\u003C/div>\"}}' \\\n  -o \"result.pdf\"\n",[33],[78],{"type":20,"tag":36,"props":79,"children":80},{"__ignoreMap":8},[81],{"type":25,"value":75},{"type":20,"tag":21,"props":83,"children":84},{},[85],{"type":25,"value":86},"With this cUrl command, you can add custom headers and footers to your PDF documents. Happy coding!",{"type":20,"tag":28,"props":88,"children":89},{"code":8},[90],{"type":20,"tag":36,"props":91,"children":92},{"__ignoreMap":8},[93],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":95},[],"content:guides:curl:adding-a-custom-header-or-footer.md","guides/curl/adding-a-custom-header-or-footer.md",{"_path":99,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":100,"description":101,"language":11,"library":11,"property":102,"output":13,"related":103,"body":105,"_type":55,"_id":135,"_source":57,"_file":136,"_extension":59},"/guides/curl/adding-a-text-watermark","Adding a text watermark","Learn how to add a text watermark to your PDF documents when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.","watermark",[104,15],"adding-an-image-watermark",{"type":17,"children":106,"toc":133},[107,112,121,126],{"type":20,"tag":21,"props":108,"children":109},{},[110],{"type":25,"value":111},"In this guide, we'll show you how to add a text watermark to your PDF documents when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":113,"children":116},{"code":114,"language":31,"meta":8,"className":115},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Add a text watermark\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"watermark\": {\"text\": \"CONFIDENTIAL\"}}' \\\n  -o \"result.pdf\"\n",[33],[117],{"type":20,"tag":36,"props":118,"children":119},{"__ignoreMap":8},[120],{"type":25,"value":114},{"type":20,"tag":21,"props":122,"children":123},{},[124],{"type":25,"value":125},"With this cUrl command, you can add text watermarks to protect your PDF documents. Happy coding!",{"type":20,"tag":28,"props":127,"children":128},{"code":8},[129],{"type":20,"tag":36,"props":130,"children":131},{"__ignoreMap":8},[132],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":134},[],"content:guides:curl:adding-a-text-watermark.md","guides/curl/adding-a-text-watermark.md",{"_path":138,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":139,"description":140,"language":11,"library":11,"property":102,"output":13,"related":141,"body":143,"_type":55,"_id":173,"_source":57,"_file":174,"_extension":59},"/guides/curl/adding-an-image-watermark","Adding an image watermark","Learn how to add an image watermark to your PDF documents when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[142,15],"adding-a-text-watermark",{"type":17,"children":144,"toc":171},[145,150,159,164],{"type":20,"tag":21,"props":146,"children":147},{},[148],{"type":25,"value":149},"In this guide, we'll show you how to add an image watermark to your PDF documents when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":151,"children":154},{"code":152,"language":31,"meta":8,"className":153},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Add an image watermark\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"watermark\": {\"image\": \"https://example.com/logo.png\"}}' \\\n  -o \"result.pdf\"\n",[33],[155],{"type":20,"tag":36,"props":156,"children":157},{"__ignoreMap":8},[158],{"type":25,"value":152},{"type":20,"tag":21,"props":160,"children":161},{},[162],{"type":25,"value":163},"With this cUrl command, you can add image watermarks to protect your PDF documents. Happy coding!",{"type":20,"tag":28,"props":165,"children":166},{"code":8},[167],{"type":20,"tag":36,"props":168,"children":169},{"__ignoreMap":8},[170],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":172},[],"content:guides:curl:adding-an-image-watermark.md","guides/curl/adding-an-image-watermark.md",{"_path":176,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":177,"description":178,"language":11,"library":11,"property":12,"output":13,"related":179,"body":181,"_type":55,"_id":211,"_source":57,"_file":212,"_extension":59},"/guides/curl/avoid-conversion-on-error","Avoid conversion on error","Learn how to prevent PDF conversion from happening when there are errors in the source HTML or CSS using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[15,180],"convert-html-to-pdf-from-raw-html",{"type":17,"children":182,"toc":209},[183,188,197,202],{"type":20,"tag":21,"props":184,"children":185},{},[186],{"type":25,"value":187},"In this guide, we'll show you how to avoid conversion on error using PDFShift's API. This allows you to prevent PDF generation when there are issues with the source content.",{"type":20,"tag":28,"props":189,"children":192},{"code":190,"language":31,"meta":8,"className":191},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Convert HTML from a URL with error handling\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"avoid_conversion_on_error\": true}' \\\n  -o \"result.pdf\"\n",[33],[193],{"type":20,"tag":36,"props":194,"children":195},{"__ignoreMap":8},[196],{"type":25,"value":190},{"type":20,"tag":21,"props":198,"children":199},{},[200],{"type":25,"value":201},"With this cUrl command, you can prevent PDF generation when errors occur in the source HTML or CSS. Happy coding!",{"type":20,"tag":28,"props":203,"children":204},{"code":8},[205],{"type":20,"tag":36,"props":206,"children":207},{"__ignoreMap":8},[208],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":210},[],"content:guides:curl:avoid-conversion-on-error.md","guides/curl/avoid-conversion-on-error.md",{"_path":214,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":215,"description":216,"language":11,"library":11,"property":12,"output":13,"related":217,"default":219,"body":220,"_type":55,"_id":250,"_source":57,"_file":251,"_extension":59},"/guides/curl/convert-html-to-pdf-from-a-url","Convert an HTML document to PDF from a URL","Learn how to easily convert HTML documents to PDF from a URL using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[180,218],"avoid-conversion-on-error",true,{"type":17,"children":221,"toc":248},[222,227,236,241],{"type":20,"tag":21,"props":223,"children":224},{},[225],{"type":25,"value":226},"In this guide, we'll show you how to convert HTML documents to PDFs using PDFShift's API. This is a straightforward process that can be accomplished with just a few lines of cUrl code.",{"type":20,"tag":28,"props":228,"children":231},{"code":229,"language":31,"meta":8,"className":230},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Convert HTML from a URL to PDF\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\"}' \\\n  -o \"result.pdf\"\n",[33],[232],{"type":20,"tag":36,"props":233,"children":234},{"__ignoreMap":8},[235],{"type":25,"value":229},{"type":20,"tag":21,"props":237,"children":238},{},[239],{"type":25,"value":240},"With this cUrl command, you can effortlessly convert HTML documents from a URL to PDF files using PDFShift's API. Happy coding!",{"type":20,"tag":28,"props":242,"children":243},{"code":8},[244],{"type":20,"tag":36,"props":245,"children":246},{"__ignoreMap":8},[247],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":249},[],"content:guides:curl:convert-html-to-pdf-from-a-url.md","guides/curl/convert-html-to-pdf-from-a-url.md",{"_path":253,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":254,"description":255,"language":11,"library":11,"property":256,"output":13,"related":257,"body":258,"_type":55,"_id":288,"_source":57,"_file":289,"_extension":59},"/guides/curl/convert-html-to-pdf-from-raw-html","Convert an HTML document to PDF from raw HTML","Learn how to easily convert HTML documents to PDF from raw HTML using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.","html",[15,218],{"type":17,"children":259,"toc":286},[260,265,274,279],{"type":20,"tag":21,"props":261,"children":262},{},[263],{"type":25,"value":264},"In this guide, we'll show you how to convert HTML documents to PDFs using PDFShift's API by providing raw HTML content. This is a straightforward process that can be accomplished with just a few lines of cUrl code.",{"type":20,"tag":28,"props":266,"children":269},{"code":267,"language":31,"meta":8,"className":268},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Convert raw HTML to PDF\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"html\": \"\u003Ch1>Hello World\u003C/h1>\u003Cp>This is a test document.\u003C/p>\"}' \\\n  -o \"result.pdf\"\n",[33],[270],{"type":20,"tag":36,"props":271,"children":272},{"__ignoreMap":8},[273],{"type":25,"value":267},{"type":20,"tag":21,"props":275,"children":276},{},[277],{"type":25,"value":278},"With this cUrl command, you can effortlessly convert raw HTML to PDF files using PDFShift's API. Happy coding!",{"type":20,"tag":28,"props":280,"children":281},{"code":8},[282],{"type":20,"tag":36,"props":283,"children":284},{"__ignoreMap":8},[285],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":287},[],"content:guides:curl:convert-html-to-pdf-from-raw-html.md","guides/curl/convert-html-to-pdf-from-raw-html.md",{"_path":291,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":292,"description":293,"language":11,"library":11,"property":12,"output":13,"related":294,"body":295,"_type":55,"_id":325,"_source":57,"_file":326,"_extension":59},"/guides/curl/define-a-time-limit","Define a time limit","Learn how to define a time limit for PDF conversion using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[15],{"type":17,"children":296,"toc":323},[297,302,311,316],{"type":20,"tag":21,"props":298,"children":299},{},[300],{"type":25,"value":301},"In this guide, we'll show you how to define a time limit for PDF conversion using PDFShift's API. This helps prevent long-running conversions from impacting your application.",{"type":20,"tag":28,"props":303,"children":306},{"code":304,"language":31,"meta":8,"className":305},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Convert HTML with a time limit of 30 seconds\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"time_limit\": 30}' \\\n  -o \"result.pdf\"\n",[33],[307],{"type":20,"tag":36,"props":308,"children":309},{"__ignoreMap":8},[310],{"type":25,"value":304},{"type":20,"tag":21,"props":312,"children":313},{},[314],{"type":25,"value":315},"With this cUrl command, you can set a time limit for PDF conversions to prevent long-running processes. Happy coding!",{"type":20,"tag":28,"props":317,"children":318},{"code":8},[319],{"type":20,"tag":36,"props":320,"children":321},{"__ignoreMap":8},[322],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":324},[],"content:guides:curl:define-a-time-limit.md","guides/curl/define-a-time-limit.md",{"_path":328,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":329,"description":330,"language":11,"library":11,"property":12,"output":13,"related":331,"body":332,"_type":55,"_id":362,"_source":57,"_file":363,"_extension":59},"/guides/curl/exporting-only-a-specific-set-of-pages","Exporting only a specific set of pages","Learn how to export only a specific set of pages when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[15],{"type":17,"children":333,"toc":360},[334,339,348,353],{"type":20,"tag":21,"props":335,"children":336},{},[337],{"type":25,"value":338},"In this guide, we'll show you how to export only specific pages when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":340,"children":343},{"code":341,"language":31,"meta":8,"className":342},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Export only pages 1 through 3\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"pages\": \"1-3\"}' \\\n  -o \"result.pdf\"\n",[33],[344],{"type":20,"tag":36,"props":345,"children":346},{"__ignoreMap":8},[347],{"type":25,"value":341},{"type":20,"tag":21,"props":349,"children":350},{},[351],{"type":25,"value":352},"With this cUrl command, you can selectively export specific pages from multi-page documents. Happy coding!",{"type":20,"tag":28,"props":354,"children":355},{"code":8},[356],{"type":20,"tag":36,"props":357,"children":358},{"__ignoreMap":8},[359],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":361},[],"content:guides:curl:exporting-only-a-specific-set-of-pages.md","guides/curl/exporting-only-a-specific-set-of-pages.md",{"_path":365,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":366,"description":367,"language":11,"library":11,"property":12,"output":13,"related":368,"body":369,"_type":55,"_id":399,"_source":57,"_file":400,"_extension":59},"/guides/curl/generate-a-document-with-full-height","Generate a document with full height","Learn how to generate PDF documents with full height using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[15],{"type":17,"children":370,"toc":397},[371,376,385,390],{"type":20,"tag":21,"props":372,"children":373},{},[374],{"type":25,"value":375},"In this guide, we'll show you how to generate PDF documents with full height using PDFShift's API. This ensures your content spans the entire page height.",{"type":20,"tag":28,"props":377,"children":380},{"code":378,"language":31,"meta":8,"className":379},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Generate a document with full height\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"full_height\": true}' \\\n  -o \"result.pdf\"\n",[33],[381],{"type":20,"tag":36,"props":382,"children":383},{"__ignoreMap":8},[384],{"type":25,"value":378},{"type":20,"tag":21,"props":386,"children":387},{},[388],{"type":25,"value":389},"With this cUrl command, you can generate PDF documents that expand to fill the full height of the page. Happy coding!",{"type":20,"tag":28,"props":391,"children":392},{"code":8},[393],{"type":20,"tag":36,"props":394,"children":395},{"__ignoreMap":8},[396],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":398},[],"content:guides:curl:generate-a-document-with-full-height.md","guides/curl/generate-a-document-with-full-height.md",{"_path":402,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":403,"description":404,"language":11,"library":11,"property":405,"output":13,"related":406,"body":408,"_type":55,"_id":438,"_source":57,"_file":439,"_extension":59},"/guides/curl/loading-css-from-a-string","Loading CSS from a string","Learn how to provide CSS styles directly as a string when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.","css",[407,15],"loading-css-from-a-url",{"type":17,"children":409,"toc":436},[410,415,424,429],{"type":20,"tag":21,"props":411,"children":412},{},[413],{"type":25,"value":414},"In this guide, we'll show you how to provide CSS styles directly as a string when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":416,"children":419},{"code":417,"language":31,"meta":8,"className":418},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Provide CSS as a string\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"css\": \"body { font-family: Arial; } h1 { color: blue; }\"}' \\\n  -o \"result.pdf\"\n",[33],[420],{"type":20,"tag":36,"props":421,"children":422},{"__ignoreMap":8},[423],{"type":25,"value":417},{"type":20,"tag":21,"props":425,"children":426},{},[427],{"type":25,"value":428},"With this cUrl command, you can provide inline CSS styles for your PDF documents. Happy coding!",{"type":20,"tag":28,"props":430,"children":431},{"code":8},[432],{"type":20,"tag":36,"props":433,"children":434},{"__ignoreMap":8},[435],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":437},[],"content:guides:curl:loading-css-from-a-string.md","guides/curl/loading-css-from-a-string.md",{"_path":441,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":442,"description":443,"language":11,"library":11,"property":405,"output":13,"related":444,"body":446,"_type":55,"_id":476,"_source":57,"_file":477,"_extension":59},"/guides/curl/loading-css-from-a-url","Loading CSS from a URL","Learn how to load external CSS stylesheets when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[445,15],"loading-css-from-a-string",{"type":17,"children":447,"toc":474},[448,453,462,467],{"type":20,"tag":21,"props":449,"children":450},{},[451],{"type":25,"value":452},"In this guide, we'll show you how to load external CSS stylesheets when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":454,"children":457},{"code":455,"language":31,"meta":8,"className":456},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Load CSS from a URL\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"css\": \"https://example.com/styles.css\"}' \\\n  -o \"result.pdf\"\n",[33],[458],{"type":20,"tag":36,"props":459,"children":460},{"__ignoreMap":8},[461],{"type":25,"value":455},{"type":20,"tag":21,"props":463,"children":464},{},[465],{"type":25,"value":466},"With this cUrl command, you can load external CSS files for styling your PDF documents. Happy coding!",{"type":20,"tag":28,"props":468,"children":469},{"code":8},[470],{"type":20,"tag":36,"props":471,"children":472},{"__ignoreMap":8},[473],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":475},[],"content:guides:curl:loading-css-from-a-url.md","guides/curl/loading-css-from-a-url.md",{"_path":479,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":480,"description":481,"language":11,"library":11,"property":482,"output":13,"related":483,"body":485,"_type":55,"_id":515,"_source":57,"_file":516,"_extension":59},"/guides/curl/loading-javascript-from-a-string","Loading JavaScript from a string","Learn how to provide JavaScript directly as a string when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.","javascript",[484,15],"loading-javascript-from-a-url",{"type":17,"children":486,"toc":513},[487,492,501,506],{"type":20,"tag":21,"props":488,"children":489},{},[490],{"type":25,"value":491},"In this guide, we'll show you how to provide JavaScript directly as a string when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":493,"children":496},{"code":494,"language":31,"meta":8,"className":495},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Provide JavaScript as a string\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"javascript\": \"document.body.style.backgroundColor = \\\"red\\\";\"}' \\\n  -o \"result.pdf\"\n",[33],[497],{"type":20,"tag":36,"props":498,"children":499},{"__ignoreMap":8},[500],{"type":25,"value":494},{"type":20,"tag":21,"props":502,"children":503},{},[504],{"type":25,"value":505},"With this cUrl command, you can provide inline JavaScript for dynamic content in your PDF documents. Happy coding!",{"type":20,"tag":28,"props":507,"children":508},{"code":8},[509],{"type":20,"tag":36,"props":510,"children":511},{"__ignoreMap":8},[512],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":514},[],"content:guides:curl:loading-javascript-from-a-string.md","guides/curl/loading-javascript-from-a-string.md",{"_path":518,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":519,"description":520,"language":11,"library":11,"property":482,"output":13,"related":521,"body":523,"_type":55,"_id":553,"_source":57,"_file":554,"_extension":59},"/guides/curl/loading-javascript-from-a-url","Loading JavaScript from a URL","Learn how to load external JavaScript files when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[522,15],"loading-javascript-from-a-string",{"type":17,"children":524,"toc":551},[525,530,539,544],{"type":20,"tag":21,"props":526,"children":527},{},[528],{"type":25,"value":529},"In this guide, we'll show you how to load external JavaScript files when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":531,"children":534},{"code":532,"language":31,"meta":8,"className":533},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Load JavaScript from a URL\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"javascript\": \"https://example.com/script.js\"}' \\\n  -o \"result.pdf\"\n",[33],[535],{"type":20,"tag":36,"props":536,"children":537},{"__ignoreMap":8},[538],{"type":25,"value":532},{"type":20,"tag":21,"props":540,"children":541},{},[542],{"type":25,"value":543},"With this cUrl command, you can load external JavaScript files for dynamic content in your PDF documents. Happy coding!",{"type":20,"tag":28,"props":545,"children":546},{"code":8},[547],{"type":20,"tag":36,"props":548,"children":549},{"__ignoreMap":8},[550],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":552},[],"content:guides:curl:loading-javascript-from-a-url.md","guides/curl/loading-javascript-from-a-url.md",{"_path":556,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":557,"description":558,"language":11,"library":11,"property":12,"output":13,"related":559,"body":560,"_type":55,"_id":590,"_source":57,"_file":591,"_extension":59},"/guides/curl/protecting-the-generated-pdf","Protecting the generated PDF","Learn how to protect the generated PDF with a password using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[15],{"type":17,"children":561,"toc":588},[562,567,576,581],{"type":20,"tag":21,"props":563,"children":564},{},[565],{"type":25,"value":566},"In this guide, we'll show you how to protect the generated PDF with a password using PDFShift's API.",{"type":20,"tag":28,"props":568,"children":571},{"code":569,"language":31,"meta":8,"className":570},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Protect the PDF with a password\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"protect\": {\"password\": \"mypassword\"}}' \\\n  -o \"result.pdf\"\n",[33],[572],{"type":20,"tag":36,"props":573,"children":574},{"__ignoreMap":8},[575],{"type":25,"value":569},{"type":20,"tag":21,"props":577,"children":578},{},[579],{"type":25,"value":580},"With this cUrl command, you can password-protect your generated PDF documents. Happy coding!",{"type":20,"tag":28,"props":582,"children":583},{"code":8},[584],{"type":20,"tag":36,"props":585,"children":586},{"__ignoreMap":8},[587],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":589},[],"content:guides:curl:protecting-the-generated-pdf.md","guides/curl/protecting-the-generated-pdf.md",{"_path":593,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"language":11,"library":11,"property":12,"output":13,"related":596,"body":598,"_type":55,"_id":628,"_source":57,"_file":629,"_extension":59},"/guides/curl/receive-a-webhook-event","Receive a webhook event","Learn how to receive webhook events when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[597,15],"save-your-pdf-online-and-get-back-a-url",{"type":17,"children":599,"toc":626},[600,605,614,619],{"type":20,"tag":21,"props":601,"children":602},{},[603],{"type":25,"value":604},"In this guide, we'll show you how to receive webhook events when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":606,"children":609},{"code":607,"language":31,"meta":8,"className":608},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Receive a webhook event upon completion\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"webhook\": {\"url\": \"https://yourdomain.com/webhook\"}}' \\\n  -o \"result.pdf\"\n",[33],[610],{"type":20,"tag":36,"props":611,"children":612},{"__ignoreMap":8},[613],{"type":25,"value":607},{"type":20,"tag":21,"props":615,"children":616},{},[617],{"type":25,"value":618},"With this cUrl command, you can receive webhook notifications when PDF conversion is complete. Happy coding!",{"type":20,"tag":28,"props":620,"children":621},{"code":8},[622],{"type":20,"tag":36,"props":623,"children":624},{"__ignoreMap":8},[625],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":627},[],"content:guides:curl:receive-a-webhook-event.md","guides/curl/receive-a-webhook-event.md",{"_path":631,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":632,"description":633,"language":11,"library":11,"property":12,"output":13,"related":634,"body":636,"_type":55,"_id":666,"_source":57,"_file":667,"_extension":59},"/guides/curl/save-your-pdf-online-and-get-back-a-url","Save your PDF online and get back a URL","Learn how to save your PDF online and get back a URL when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[635,15],"save-your-pdf-to-your-amazon-s3-bucket",{"type":17,"children":637,"toc":664},[638,643,652,657],{"type":20,"tag":21,"props":639,"children":640},{},[641],{"type":25,"value":642},"In this guide, we'll show you how to save your PDF online and get back a URL when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":644,"children":647},{"code":645,"language":31,"meta":8,"className":646},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Save PDF online and get a URL\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"filename\": \"my-document.pdf\", \"webhook\": {\"url\": \"https://yourdomain.com/webhook\"}}' \\\n  -o \"result.pdf\"\n",[33],[648],{"type":20,"tag":36,"props":649,"children":650},{"__ignoreMap":8},[651],{"type":25,"value":645},{"type":20,"tag":21,"props":653,"children":654},{},[655],{"type":25,"value":656},"With this cUrl command, you can save your PDF online and receive a URL to access it. Happy coding!",{"type":20,"tag":28,"props":658,"children":659},{"code":8},[660],{"type":20,"tag":36,"props":661,"children":662},{"__ignoreMap":8},[663],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":665},[],"content:guides:curl:save-your-pdf-online-and-get-back-a-url.md","guides/curl/save-your-pdf-online-and-get-back-a-url.md",{"_path":669,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":670,"description":671,"language":11,"library":11,"property":12,"output":13,"related":672,"body":673,"_type":55,"_id":703,"_source":57,"_file":704,"_extension":59},"/guides/curl/save-your-pdf-to-your-amazon-s3-bucket","Save your PDF to your Amazon S3 bucket","Learn how to save your PDF directly to an Amazon S3 bucket when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[597,15],{"type":17,"children":674,"toc":701},[675,680,689,694],{"type":20,"tag":21,"props":676,"children":677},{},[678],{"type":25,"value":679},"In this guide, we'll show you how to save your PDF directly to an Amazon S3 bucket when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":681,"children":684},{"code":682,"language":31,"meta":8,"className":683},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Save PDF to Amazon S3 bucket\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"filename\": \"my-document.pdf\", \"s3\": {\"bucket\": \"my-bucket\", \"key\": \"documents/my-document.pdf\"}}' \\\n  -o \"result.pdf\"\n",[33],[685],{"type":20,"tag":36,"props":686,"children":687},{"__ignoreMap":8},[688],{"type":25,"value":682},{"type":20,"tag":21,"props":690,"children":691},{},[692],{"type":25,"value":693},"With this cUrl command, you can directly save your PDF to an Amazon S3 bucket. Happy coding!",{"type":20,"tag":28,"props":695,"children":696},{"code":8},[697],{"type":20,"tag":36,"props":698,"children":699},{"__ignoreMap":8},[700],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":702},[],"content:guides:curl:save-your-pdf-to-your-amazon-s3-bucket.md","guides/curl/save-your-pdf-to-your-amazon-s3-bucket.md",{"_path":706,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":707,"description":708,"language":11,"library":11,"property":12,"output":13,"related":709,"body":710,"_type":55,"_id":740,"_source":57,"_file":741,"_extension":59},"/guides/curl/send-custom-http-headers","Send custom HTTP headers","Learn how to send custom HTTP headers when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[15],{"type":17,"children":711,"toc":738},[712,717,726,731],{"type":20,"tag":21,"props":713,"children":714},{},[715],{"type":25,"value":716},"In this guide, we'll show you how to send custom HTTP headers when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":718,"children":721},{"code":719,"language":31,"meta":8,"className":720},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Send custom HTTP headers\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -H \"User-Agent: MyCustomAgent/1.0\" \\\n  -d '{\"source\": \"https://www.example.com\"}' \\\n  -o \"result.pdf\"\n",[33],[722],{"type":20,"tag":36,"props":723,"children":724},{"__ignoreMap":8},[725],{"type":25,"value":719},{"type":20,"tag":21,"props":727,"children":728},{},[729],{"type":25,"value":730},"With this cUrl command, you can send custom HTTP headers to the source URL. Happy coding!",{"type":20,"tag":28,"props":732,"children":733},{"code":8},[734],{"type":20,"tag":36,"props":735,"children":736},{"__ignoreMap":8},[737],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":739},[],"content:guides:curl:send-custom-http-headers.md","guides/curl/send-custom-http-headers.md",{"_path":743,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":744,"description":745,"language":11,"library":11,"property":12,"output":13,"related":746,"body":747,"_type":55,"_id":777,"_source":57,"_file":778,"_extension":59},"/guides/curl/using-cookies","Using cookies","Learn how to use cookies when converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[15],{"type":17,"children":748,"toc":775},[749,754,763,768],{"type":20,"tag":21,"props":750,"children":751},{},[752],{"type":25,"value":753},"In this guide, we'll show you how to use cookies when converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":755,"children":758},{"code":756,"language":31,"meta":8,"className":757},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Use cookies for authentication\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"cookies\": [{\"name\": \"session\", \"value\": \"abc123\"}]}' \\\n  -o \"result.pdf\"\n",[33],[759],{"type":20,"tag":36,"props":760,"children":761},{"__ignoreMap":8},[762],{"type":25,"value":756},{"type":20,"tag":21,"props":764,"children":765},{},[766],{"type":25,"value":767},"With this cUrl command, you can pass cookies to authenticate with protected content. Happy coding!",{"type":20,"tag":28,"props":769,"children":770},{"code":8},[771],{"type":20,"tag":36,"props":772,"children":773},{"__ignoreMap":8},[774],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":776},[],"content:guides:curl:using-cookies.md","guides/curl/using-cookies.md",{"_path":780,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":781,"description":782,"language":11,"library":11,"property":12,"output":13,"related":783,"body":784,"_type":55,"_id":814,"_source":57,"_file":815,"_extension":59},"/guides/curl/waiting-for-a-custom-element-to-be-ready","Waiting for a custom element to be ready","Learn how to wait for a custom element to be ready before converting HTML to PDF using cUrl. This how-to guide offers clear cUrl code examples that show developers how to implement this using the PDFShift API.",[15],{"type":17,"children":785,"toc":812},[786,791,800,805],{"type":20,"tag":21,"props":787,"children":788},{},[789],{"type":25,"value":790},"In this guide, we'll show you how to wait for a custom element to be ready before converting HTML to PDF using PDFShift's API.",{"type":20,"tag":28,"props":792,"children":795},{"code":793,"language":31,"meta":8,"className":794},"# You can get an API key at https://pdfshift.io\nAPI_KEY=\"sk_xxxxxxxxxxxx\"\n\n# Wait for a custom element to be ready\ncurl -X POST \"https://api.pdfshift.io/v3/convert/pdf\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: ${API_KEY}\" \\\n  -d '{\"source\": \"https://www.example.com\", \"wait_for\": \"#dynamic-content\"}' \\\n  -o \"result.pdf\"\n",[33],[796],{"type":20,"tag":36,"props":797,"children":798},{"__ignoreMap":8},[799],{"type":25,"value":793},{"type":20,"tag":21,"props":801,"children":802},{},[803],{"type":25,"value":804},"With this cUrl command, you can delay PDF conversion until specific elements are ready. Happy coding!",{"type":20,"tag":28,"props":806,"children":807},{"code":8},[808],{"type":20,"tag":36,"props":809,"children":810},{"__ignoreMap":8},[811],{"type":25,"value":8},{"title":8,"searchDepth":53,"depth":53,"links":813},[],"content:guides:curl:waiting-for-a-custom-element-to-be-ready.md","guides/curl/waiting-for-a-custom-element-to-be-ready.md",1780405098068]