Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file.
An array of content parts to render into a single PDF. Each part can be a URL string, HTML content string, or a structured content object with type and content.
Required array length: 1 - 50 elements
A content part that can be a URL string, HTML string, or a structured content object.
Emulates the specified media type during rendering. Use 'screen' for web display styles or 'print' for print-optimized styles. Particularly useful for pages with different CSS for screen and print media queries.
Evaluates a JavaScript expression in the page context before rendering. Useful for manipulating the DOM, triggering actions, or waiting for dynamic content to load. If the expression returns a Promise, rendering will wait for it to resolve.
Specifies which pages to include in the output using a comma-separated list of page ranges (e.g., '1-5, 8, 11-13'). Uses one-based indexing. Pages will be included in the document's natural order regardless of the specified range, and each page will only be included once. An empty string includes all pages.
Whether to prioritize page size defined in CSS using @page rules. When true, CSS page size takes precedence over the 'size' parameter. When false, content will be scaled to fit the specified paper size.
Specifies how the PDF should be encoded in the response. 'binary' returns raw bytes, while 'base64' returns a base64-encoded string.
Available options:
binary,
base64
Response
Render succeeded
Binary PDF file
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Vortex PDF Documentation","colors":{"primary":"#0467c9","light":"#72DACA","dark":"#72DACA"},"logo":{"light":"https://mintcdn.com/ultimatemachine/3HvJ2shIR-BI6t3m/logo/vortex-logo-light.svg?fit=max\u0026auto=format\u0026n=3HvJ2shIR-BI6t3m\u0026q=85\u0026s=991c27f0619d1cf2a95586e20687fcf1","dark":"https://mintcdn.com/ultimatemachine/3HvJ2shIR-BI6t3m/logo/vortex-logo-dark.svg?fit=max\u0026auto=format\u0026n=3HvJ2shIR-BI6t3m\u0026q=85\u0026s=08faec6fa623baad57ec7e360c37b682"},"favicon":"/favicon.svg","navbar":{"links":[{"label":"Support","href":"mailto:support@vortexpdf.com"},{"label":"Status","href":"https://status.vortexpdf.com"},{"label":"Dashboard","href":"https://vortexpdf.com/dashboard"}]},"footer":{"socials":{"x":"https://x.com/vortexpdf","github":"https://github.com/vortexpdf","linkedin":"https://linkedin.com/company/vortexpdf"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ultimatemachine","hasAudioNarration":false,"actualSubdomain":"ultimatemachine","customDomains":["docs.vortexpdf.com"],"gitSource":{"type":"github","owner":"miickel","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e695044dd579e9b57ba9","collectionId":"ea871a00-74ac-4a43-a24f-942772f21776","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21e695044dd579e9b57ba9:success","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Guides","count":24},{"language":"default","tag":"API Reference","count":9},{"language":"default","tag":"Page configuration","count":8},{"language":"default","tag":"Get started","count":6},{"language":"default","tag":"Content handling","count":6},{"language":"default","tag":"Templates","count":5},{"language":"default","tag":"Asynchronous processing","count":2},{"language":"default","tag":"Output options","count":2},{"language":"default","tag":"Renderers","count":2},{"language":"default","tag":"Credits","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/renderers/create-pdf-synchronously","slug":"/api-reference/renderers/create-pdf-synchronously","pageMetadata":{"title":"Create PDF synchronously","description":"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file. ","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi post /api/v1/renderers/pdf","href":"/api-reference/renderers/create-pdf-synchronously","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create PDF synchronously","description":"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file. ","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi post /api/v1/renderers/pdf","href":"/api-reference/renderers/create-pdf-synchronously","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"callbacks":{},"description":"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file. ","operationId":"VortexWeb.API.V1.RenderController.render_sync","parameters":[],"requestBody":"05723cff-3a5b-4565-a2d3-48752e05d4ea","responses":{"200":"cfed78d9-cdaa-4c6e-aada-98984ca4ae36","401":"d2735853-75ff-45e9-9078-99fe235e320d","403":"0a06e064-54fa-46c8-b91c-6e2d2561afa8","404":"f51bf463-74d4-452c-9526-ce2b55ccdbf4","422":"215f5258-2d2b-49f9-9766-42e8ab520898"},"security":["dc807a13-e922-45a5-b60b-fefb0702085d"],"summary":"Create PDF synchronously","tags":["Renderers"],"method":"post","type":"path","servers":["a0935974-d09f-42a4-8fbb-14b452670648"],"path":"/api/v1/renderers/pdf","baseUrlOptions":["https://vortexpdf.com"],"title":"Create PDF synchronously","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"sync_render_options","description":"Options for synchronous PDF rendering, where the PDF is returned directly in the API response.","required":["parts"],"properties":{"parts":{"description":"An array of content parts to render into a single PDF. Each part can be a URL string, HTML content string, or a structured content object with type and content.","example":["https://example.com","\u003ch1>Hello World\u003c/h1>",{"content":"\u003cdiv>Structured HTML content\u003c/div>","type":"html"},{"content":{"context":{"customer_name":"Acme Inc."},"template_id":"invoice_template"},"type":"template"}],"items":{"oneOf":[{"type":"string","title":"url_string","description":"A content part that can be a URL string, HTML string, or a structured content object.","format":"uri","pattern":"^https?://\\S+","uniqueKey":"parts.items.[INDEX].oneOf.0","typeLabel":"string\u003curi>"},{"type":"string","title":"html_string","description":"A content part that can be a URL string, HTML string, or a structured content object.","pattern":"^\\s*\u003c[^>]+>","uniqueKey":"parts.items.[INDEX].oneOf.1","typeLabel":"string"},{"type":"object","title":"content_part","description":"A content part that can be a URL string, HTML string, or a structured content object.","required":["type","content"],"example":{"content":"https://example.com","type":"url"},"properties":{"content":{"oneOf":[{"type":"string","title":"content","description":"The content to render - either a URL string when type is 'url', HTML markup when type is 'html', or a template specification object when type is 'template'.","isRequired":true,"uniqueKey":"parts.items.[INDEX].oneOf.2.content.oneOf.0","typeLabel":"string"},{"type":"object","title":"template_content","description":"Template specification with context data for rendering into HTML","required":["template_id"],"example":{"context":{"customer_name":"Acme Inc.","invoice_number":"INV-2023-001","items":[{"description":"Product A","price":100,"quantity":2},{"description":"Product B","price":50,"quantity":1}]},"template_id":"invoice_template"},"properties":{"template_id":{"description":"Unique identifier for the template to use","title":"template_id","type":"string","isRequired":true,"uniqueKey":"parts.items.[INDEX].oneOf.2.content.oneOf.1.template_id","typeLabel":"string"},"context":{"additionalProperties":true,"description":"JSON object containing data to be inserted into the template","title":"context","type":"object","uniqueKey":"parts.items.[INDEX].oneOf.2.content.oneOf.1.context","typeLabel":"context · object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"parts.items.[INDEX].oneOf.2.content.oneOf.1","typeLabel":"template_content · object"}],"isRequired":true,"uniqueKey":"parts.items.[INDEX].oneOf.2.content","typeLabel":"string | template_content · object"},"type":{"description":"The type of content to render - 'url' for a web page, 'html' for raw HTML content, or 'template' for template-based rendering.","enum":["url","html","template"],"title":"type","type":"string","isRequired":true,"uniqueKey":"parts.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"parts.items.[INDEX].oneOf.2","typeLabel":"content_part · object"}],"uniqueKey":"parts.items.[INDEX]","typeLabel":"string\u003curi> | string | content_part · object"},"maxItems":50,"minItems":1,"title":"content_parts","type":"array","isRequired":true,"uniqueKey":"parts","typeLabel":"(string\u003curi> | string | content_part · object)[]"},"emulate_media_type":{"default":"print","description":"Emulates the specified media type during rendering. Use 'screen' for web display styles or 'print' for print-optimized styles. Particularly useful for pages with different CSS for screen and print media queries.","enum":["screen","print"],"title":"emulate_media_type","type":"string","uniqueKey":"emulate_media_type","typeLabel":"enum\u003cstring>"},"evaluate_js":{"additionalProperties":false,"description":"Evaluates a JavaScript expression in the page context before rendering. Useful for manipulating the DOM, triggering actions, or waiting for dynamic content to load. If the expression returns a Promise, rendering will wait for it to resolve.","properties":{"expression":{"description":"The JavaScript expression to evaluate in the page context.","title":"expression","type":"string","isRequired":true,"uniqueKey":"evaluate_js.expression","typeLabel":"string"}},"required":["expression"],"title":"evaluate_js","type":"object","uniqueKey":"evaluate_js","typeLabel":"evaluate_js · object"},"footer_template":{"description":"HTML template for the page footer. Supports special classes like 'date', 'title', 'url', 'pageNumber', and 'totalPages' for dynamic content.","title":"footer_template","type":"string","uniqueKey":"footer_template","typeLabel":"string"},"header_template":{"description":"HTML template for the page header. Supports special classes like 'date', 'title', 'url', 'pageNumber', and 'totalPages' for dynamic content.","title":"header_template","type":"string","uniqueKey":"header_template","typeLabel":"string"},"include_backgrounds":{"default":true,"description":"Whether to include background images and colors in the rendered PDF. Set to false to optimize for printing or reduce file size.","title":"include_backgrounds","type":"boolean","uniqueKey":"include_backgrounds","typeLabel":"boolean"},"margin":{"additionalProperties":false,"default":{"bottom":0,"left":0,"right":0,"top":0,"unit":"mm"},"description":"Document margins specification with unit. Controls the space between the page edges and content.","example":{"bottom":10,"left":10,"right":10,"top":10,"unit":"mm"},"properties":{"bottom":{"description":"Bottom margin in the specified unit","minimum":0,"type":"number","isRequired":true,"uniqueKey":"margin.bottom","typeLabel":"number"},"left":{"description":"Left margin in the specified unit","minimum":0,"type":"number","isRequired":true,"uniqueKey":"margin.left","typeLabel":"number"},"right":{"description":"Right margin in the specified unit","minimum":0,"type":"number","isRequired":true,"uniqueKey":"margin.right","typeLabel":"number"},"top":{"description":"Top margin in the specified unit","minimum":0,"type":"number","isRequired":true,"uniqueKey":"margin.top","typeLabel":"number"},"unit":{"default":"mm","description":"Measurement unit for margin dimensions","enum":["mm","cm","in","px"],"type":"string","uniqueKey":"margin.unit","typeLabel":"enum\u003cstring>"}},"required":["top","right","bottom","left"],"title":"margin","type":"object","uniqueKey":"margin","typeLabel":"margin · object"},"orientation":{"default":"portrait","description":"Page orientation for the PDF. 'portrait' is taller than wide, 'landscape' is wider than tall.","enum":["portrait","landscape"],"title":"orientation","type":"string","uniqueKey":"orientation","typeLabel":"enum\u003cstring>"},"output_format":{"default":"pdf/a","description":"Output file format. 'pdf/a' is PDF/A-2b compliant for archiving, while 'pdf' is standard PDF.","enum":["pdf/a","pdf"],"title":"output_format","type":"string","uniqueKey":"output_format","typeLabel":"enum\u003cstring>"},"pages":{"default":"","description":"Specifies which pages to include in the output using a comma-separated list of page ranges (e.g., '1-5, 8, 11-13'). Uses one-based indexing. Pages will be included in the document's natural order regardless of the specified range, and each page will only be included once. An empty string includes all pages.","pattern":"^$|^(\\d+(-\\d+)?)(,\\s*(\\d+(-\\d+)?))*$","title":"pages","type":"string","uniqueKey":"pages","typeLabel":"string"},"prefer_css_page_size":{"default":false,"description":"Whether to prioritize page size defined in CSS using @page rules. When true, CSS page size takes precedence over the 'size' parameter. When false, content will be scaled to fit the specified paper size.","title":"prefer_css_page_size","type":"boolean","uniqueKey":"prefer_css_page_size","typeLabel":"boolean"},"render_header_footer":{"default":false,"description":"Whether to render the header and footer templates on each page. Must be true for header_template and footer_template to take effect.","title":"render_header_footer","type":"boolean","uniqueKey":"render_header_footer","typeLabel":"boolean"},"scale":{"default":1,"description":"Scale factor for the webpage rendering. Values below 1.0 reduce size, above 1.0 enlarge content.","maximum":2,"minimum":0.1,"title":"scale","type":"number","uniqueKey":"scale","typeLabel":"number"},"set_cookie":{"additionalProperties":false,"description":"Sets a cookie before rendering, useful for authenticated content or personalized views.","properties":{"domain":{"description":"Cookie domain (must match the domain of the URL being rendered)","type":"string","isRequired":true,"uniqueKey":"set_cookie.domain","typeLabel":"string"},"name":{"description":"Cookie name","type":"string","isRequired":true,"uniqueKey":"set_cookie.name","typeLabel":"string"},"value":{"description":"Cookie value","type":"string","isRequired":true,"uniqueKey":"set_cookie.value","typeLabel":"string"}},"required":["name","value","domain"],"title":"set_cookie","type":"object","uniqueKey":"set_cookie","typeLabel":"set_cookie · object"},"size":{"oneOf":[{"type":"string","title":"size_preset","description":"Standard document size preset name.","default":"a4","enum":["a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","letter","legal","tabloid","ledger"],"example":"a4","uniqueKey":"size.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","title":"size_custom","description":"Custom document size dimensions with unit.","default":"a4","required":["width","height"],"example":"a4","properties":{"height":{"description":"Document height in the specified unit.","type":"number","isRequired":true,"uniqueKey":"size.oneOf.1.height","typeLabel":"number"},"width":{"description":"Document width in the specified unit.","type":"number","isRequired":true,"uniqueKey":"size.oneOf.1.width","typeLabel":"number"},"unit":{"default":"mm","description":"Measurement unit for dimensions.","enum":["mm","cm","in","px"],"type":"string","uniqueKey":"size.oneOf.1.unit","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"size.oneOf.1","typeLabel":"size_custom · object"}],"uniqueKey":"size","typeLabel":"enum\u003cstring> | size_custom · object"},"wait_for":{"additionalProperties":false,"description":"Waits for a specific element attribute to be set before rendering, useful for ensuring dynamic content is fully loaded.","properties":{"attribute":{"description":"The attribute name to wait for on the selected element. Rendering will proceed once this attribute exists on the element.","title":"attribute","type":"string","isRequired":true,"uniqueKey":"wait_for.attribute","typeLabel":"string"},"selector":{"description":"CSS selector for the element to wait for (e.g., '#content' or '.ready').","title":"selector","type":"string","isRequired":true,"uniqueKey":"wait_for.selector","typeLabel":"string"}},"required":["selector","attribute"],"title":"wait_for","type":"object","uniqueKey":"wait_for","typeLabel":"wait_for · object"},"output_encoding":{"default":"binary","description":"Specifies how the PDF should be encoded in the response. 'binary' returns raw bytes, while 'base64' returns a base64-encoded string.","enum":["binary","base64"],"title":"output_encoding","type":"string","uniqueKey":"output_encoding","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"","typeLabel":"sync_render_options · object"},"examples":{"Example":{"title":"Example","value":{"parts":["https://example.com","\u003ch1>Hello World\u003c/h1>",{"content":"\u003cdiv>Structured HTML content\u003c/div>","type":"html"},{"content":{"context":{"customer_name":"Acme Inc."},"template_id":"invoice_template"},"type":"template"}],"emulate_media_type":"print","footer_template":"\u003cstring>","header_template":"\u003cstring>","include_backgrounds":true,"margin":{"bottom":10,"left":10,"right":10,"top":10,"unit":"mm"},"orientation":"portrait","output_format":"pdf/a","pages":"","prefer_css_page_size":false,"render_header_footer":false,"scale":1,"size":"a4","output_encoding":"binary"}}},"exampleType":"generated"}},"description":"Render options","required":true,"exampleType":"generated"},"responses":{"cfed78d9-cdaa-4c6e-aada-98984ca4ae36":{"content":{"application/json":{"schema":{"oneOf":[{"type":"string","title":"pdf_binary","description":"Binary PDF file","format":"binary","example":{"data":"JVBERi0xLjcKJeLj+C...","encoding":"base64"},"uniqueKey":"oneOf.0","typeLabel":"file"},{"type":"object","title":"pdf_base64","description":"The rendered PDF file encoded as a base64 string.","required":["data","encoding"],"example":{"data":"JVBERi0xLjcKJeLj+C...","encoding":"base64"},"properties":{"data":{"description":"The rendered PDF file encoded as a base64 string.","format":"base64","type":"string","isRequired":true,"uniqueKey":"oneOf.1.data","typeLabel":"file"},"encoding":{"description":"The encoding of the PDF file.","enum":["base64"],"type":"string","isRequired":true,"uniqueKey":"oneOf.1.encoding","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1","typeLabel":"pdf_base64 · object"}],"uniqueKey":"","typeLabel":"file | pdf_base64 · object"},"examples":{"Example":{"title":"Example","value":{"data":"JVBERi0xLjcKJeLj+C...","encoding":"base64"}}},"exampleType":"generated"}},"description":"Render succeeded","exampleType":"generated"},"d2735853-75ff-45e9-9078-99fe235e320d":{"content":{"application/json":{"schema":{"description":"Response when authentication or authorization fails","example":{"error":"unauthorized","message":"Authentication required to access this resource"},"properties":{"error":{"description":"Error message describing the authentication or authorization failure","enum":["unauthorized","forbidden","invalid_token","expired_token","insufficient_permissions"],"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"enum\u003cstring>"},"message":{"description":"A more detailed message explaining the error","type":"string","uniqueKey":"message","typeLabel":"string"}},"required":["error"],"title":"auth_error_response","type":"object","uniqueKey":"","typeLabel":"auth_error_response · object"},"examples":{"Example":{"title":"Example","value":{"error":"unauthorized","message":"Authentication required to access this resource"}}},"exampleType":"generated"}},"description":"Unauthorized","exampleType":"generated"},"0a06e064-54fa-46c8-b91c-6e2d2561afa8":{"content":{"application/json":{"schema":{"description":"Response when authentication or authorization fails","example":{"error":"unauthorized","message":"Authentication required to access this resource"},"properties":{"error":{"description":"Error message describing the authentication or authorization failure","enum":["unauthorized","forbidden","invalid_token","expired_token","insufficient_permissions"],"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"enum\u003cstring>"},"message":{"description":"A more detailed message explaining the error","type":"string","uniqueKey":"message","typeLabel":"string"}},"required":["error"],"title":"auth_error_response","type":"object","uniqueKey":"","typeLabel":"auth_error_response · object"},"examples":{"Example":{"title":"Example","value":{"error":"unauthorized","message":"Authentication required to access this resource"}}},"exampleType":"generated"}},"description":"Forbidden","exampleType":"generated"},"f51bf463-74d4-452c-9526-ce2b55ccdbf4":{"content":{"application/json":{"schema":{"description":"Response when an error occurs","properties":{"error":{"properties":{"message":{"description":"Error message","type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"required":["message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"title":"error_response","type":"object","uniqueKey":"","typeLabel":"error_response · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"Resource not found","exampleType":"generated"},"215f5258-2d2b-49f9-9766-42e8ab520898":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"properties":{"detail":{"example":"null value where string expected","type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"},"source":{"properties":{"pointer":{"example":"/data/attributes/petName","type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].source.pointer","typeLabel":"string"}},"required":["pointer"],"type":"object","isRequired":true,"uniqueKey":"errors.items.[INDEX].source","typeLabel":"object"},"title":{"example":"Invalid value","type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].title","typeLabel":"string"}},"required":["title","source","detail"],"type":"object","uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"errors","typeLabel":"object[]"}},"required":["errors"],"title":"JsonErrorResponse","type":"object","uniqueKey":"","typeLabel":"JsonErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"errors":[{"detail":"null value where string expected","source":{"pointer":"/data/attributes/petName"},"title":"Invalid value"}]}}},"exampleType":"generated"}},"description":"Unprocessable Entity","exampleType":"generated"}},"security":{"dc807a13-e922-45a5-b60b-fefb0702085d":{"authorization":{"description":"Manage your API keys at https://vortexpdf.com/api-keys","scheme":"bearer","type":"http","scopes":[]}}},"servers":{"a0935974-d09f-42a4-8fbb-14b452670648":{"url":"https://vortexpdf.com","variables":{}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"description":"Manage your API keys at https://vortexpdf.com/api-keys","scheme":"bearer","type":"http","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Manage your API keys at https://vortexpdf.com/api-keys","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"authorization","name":"Authorization"}],"title":"authorization"}]},"originalFileLocation":"https://vortexpdf.com/openapi"},"subdomain":"ultimatemachine","siteName":"Vortex PDF Documentation","title":"Create PDF synchronously - Vortex PDF Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T06:50:12.644Z","originalFileLocation":"api-reference/renderers/create-pdf-synchronously.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Vortex PDF Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create PDF synchronously - Vortex PDF Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Vortex PDF Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ultimatemachine.mintlify.app/_mintlify/api/og/v2?division=Renderers\u0026amp;title=Create+PDF+synchronously\u0026amp;description=Generate+a+PDF+from+one+or+more+content+sources+and+return+it+directly+in+the+response.+Content+can+be+provided+as+URLs+to+fetch%2C+raw+HTML+strings%2C+or+a+combina\u0026amp;theme=7310db011bfe049804f58f29\u0026amp;signature=9a753a349540aacd6fda6ac298fd4cde71e33cf60392b8a9021632476f2122ce\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create PDF synchronously - Vortex PDF Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ultimatemachine.mintlify.app/_mintlify/api/og/v2?division=Renderers\u0026amp;title=Create+PDF+synchronously\u0026amp;description=Generate+a+PDF+from+one+or+more+content+sources+and+return+it+directly+in+the+response.+Content+can+be+provided+as+URLs+to+fetch%2C+raw+HTML+strings%2C+or+a+combina\u0026amp;theme=7310db011bfe049804f58f29\u0026amp;signature=9a753a349540aacd6fda6ac298fd4cde71e33cf60392b8a9021632476f2122ce\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ultimatemachine/nOQyTUjKdTu37Dg9/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Vortex PDF Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0467c9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/renderers/create-pdf-synchronously.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vortexpdf.com/#organization\",\"name\":\"Vortex PDF Documentation\",\"url\":\"https://docs.vortexpdf.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ultimatemachine/3HvJ2shIR-BI6t3m/logo/vortex-logo-light.svg?fit=max\u0026auto=format\u0026n=3HvJ2shIR-BI6t3m\u0026q=85\u0026s=991c27f0619d1cf2a95586e20687fcf1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vortexpdf.com#website\",\"name\":\"Vortex PDF Documentation\",\"url\":\"https://docs.vortexpdf.com\",\"publisher\":{\"@id\":\"https://docs.vortexpdf.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously#webpage\",\"url\":\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously\",\"name\":\"Create PDF synchronously\",\"description\":\"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file.\",\"dateModified\":\"2026-01-07T06:50:12.644Z\",\"isPartOf\":{\"@id\":\"https://docs.vortexpdf.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Vortex PDF Documentation\",\"item\":\"https://docs.vortexpdf.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create PDF synchronously\",\"item\":\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously#apireference\",\"headline\":\"Create PDF synchronously\",\"name\":\"Create PDF synchronously\",\"description\":\"Generate a PDF from one or more content sources and return it directly in the response. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. The response will contain the generated PDF file.\",\"url\":\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vortexpdf.com/api-reference/renderers/create-pdf-synchronously#webpage\"},\"dateModified\":\"2026-01-07T06:50:12.644Z\",\"publisher\":{\"@id\":\"https://docs.vortexpdf.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vortexpdf.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Vortex PDF Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Vortex PDF Documentation","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Credits","pages":[{"title":"Get credits usage","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi get /api/v1/credits","href":"/api-reference/credits/get-credits-usage"}]},{"group":"Vortex","pages":[{"title":"Health check","description":"Returns the current health status of the API","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi get /api/v1/health","href":"/api-reference/vortex/health-check"}]},{"group":"Renderers","pages":[{"title":"Create PDF synchronously","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi post /api/v1/renderers/pdf","href":"/api-reference/renderers/create-pdf-synchronously"},{"title":"Create PDF asynchronously","description":"Generate a PDF from one or more content sources in the background and store it in the specified cloud destination. Content can be provided as URLs to fetch, raw HTML strings, or a combination of both. This endpoint returns immediately with a success status while the rendering happens asynchronously. When rendering completes, the PDF will be uploaded to the specified destination, and an optional callback URL will be called. ","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi post /api/v1/renderers/pdf/async","href":"/api-reference/renderers/create-pdf-asynchronously"}]},{"group":"Templates","pages":[{"title":"List templates","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi get /api/v1/templates","href":"/api-reference/templates/list-templates"},{"title":"Create template","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi post /api/v1/templates","href":"/api-reference/templates/create-template"},{"title":"Get template","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi get /api/v1/templates/{id}","href":"/api-reference/templates/get-template"},{"title":"Delete template","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi delete /api/v1/templates/{id}","href":"/api-reference/templates/delete-template"},{"title":"Update template","deprecated":null,"version":null,"openapi":"https://vortexpdf.com/openapi patch /api/v1/templates/{id}","href":"/api-reference/templates/update-template"}]}]}]},"title":"Create PDF synchronously - Vortex PDF Documentation","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-WRhTSUDL.js","utils-ChMov4Kr.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp6nVRCu.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CY2WdoTl.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js","Page-R3M_BF4L.js","getPastedJson-DD7kUzi_.js","icon-holE3QoJ.js","MethodPill-DUW0T8us.js","DuplicateIcon-CI_p4be-.js","createIcon-BdbRvavb.js","DynamicMarkdown-DN96a4Ur.js","SectionHeading-SCu36A9d.js","axios-vUo_bRtp.js","Markdown-CCeGv-zI.js","clsx-BGBGWFTt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Cv_O2fky.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-2C5OB2eV.js"]}