Render a small HTML document as a PDF. The default response is binary application/pdf; use response_type: "base64" only when your application needs the PDF inside a JSON envelope.The Playground is deliberately limited to response_type: "base64" and returns the JSON envelope only. For a raw application/pdf response, use Postman or your backend integration.
Live Testing Guide: Before using Try it, create a Development project, then enter its Client ID and Client Secret. Configure the relevant provider for that project before sending the request.
HTML can contain invoice details, customer data, and other sensitive business information. Send X-Privacy-Mode: 1 when that privacy guarantee is appropriate for the request. Never place Project Client Secrets in frontend code.
API endpoint
POST
https://avraapi.com/api/v1/utilities/pdf/generate
Request fields
Field
Required
Rules
html
Yes
HTML source; 1–524,288 bytes after decoding when is_base64 is true.
is_base64
No
Boolean. When true, send Base64-encoded HTML in html; AvraAPI decodes it before validation and rendering. Default false.
page_size
No
A4 (default), Letter, or Legal.
orientation
No
portrait (default) or landscape.
margins.top
No
Top margin in millimetres, from 0 to 100; default 15.
margins.right
No
Right margin in millimetres, from 0 to 100; default 15.
margins.bottom
No
Bottom margin in millimetres, from 0 to 100; default 15.
margins.left
No
Left margin in millimetres, from 0 to 100; default 15.
response_type
No
binary (default) for application/pdf, or base64 for a JSON response.
privacy_mode
No
Boolean request-level privacy setting. X-Privacy-Mode: 1 is the shared universal override.
AvraAPI sanitizes the HTML before rendering. Treat the result as a document generated from your own content: keep complex document storage, delivery, and authorization in your backend.
Request example
This request receives a real PDF stream. The --output option saves that binary response as a file.
response_type: "binary" is the default. A successful request returns the PDF bytes with Content-Type: application/pdf, Content-Length, Cache-Control: no-store, Content-Disposition: inline; filename="apix-document.pdf", and X-APIX-Request-ID headers.The PDF is the response body, not a JSON object. Use this mode from your backend, Postman, or another HTTP client that can handle binary media.
Base64 JSON response
Set response_type to base64 when a JSON response is required. data.data contains Base64 PDF bytes; it is not a temporary download link and AvraAPI does not store an artifact for later retrieval through this API.
The value above is intentionally truncated. A successful response carries the complete Base64 document. Decode it only in a protected backend or trusted application context; do not place PDF content containing sensitive data into browser logs, analytics, or public client state.
Error codes
HTTP
error.code
When it happens
What to do
400
http_error
PDF rendering could not process the supplied HTML or a permitted external image.
Correct the document content and retry with a small controlled example first.
401
unauthorized
Credentials are missing, invalid, inactive, or do not match X-ENV.
Check your backend credential configuration.
402
insufficient_funds
The selected PDF Generator integration requires credits that are unavailable.
Check the project balance and service configuration.
422
validation_failed
html is missing, malformed Base64 was used with is_base64, or a field is outside its documented range or enum.
Correct the request using the field details in the response.
422
provider_selection_failed
No active HTML to PDF integration can be selected for the project environment.
Enable or configure the HTML to PDF Converter integration.
429
rate_limit_exceeded
The configured request limit was reached.
Respect Retry-After when present.
500
internal_error
The renderer could not complete unexpectedly.
Retain the request ID and retry only when your workflow permits it.
503
project_paused
The project is paused.
Reactivate the project before retrying.
See the REST API guide for shared credentials, privacy, and response-handling rules.
Playground resources
The generated reference below lists this endpoint’s API standard details: request fields, authorizations, and response schema. The complete integration guide, request and response examples, and endpoint-specific error handling are above.
Authorizations
X-API-KEY
string
header
required
Your Development project's Client ID. Enter your own value in the Documentation Playground.
X-API-SECRET
string
header
required
Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.
Headers
X-ENV
enum<string>
default:development
Selects the Development credential environment. The Documentation Playground exposes Development values only; normal backend integrations may use their documented Production credentials outside this tool.
Available options:
dev,
development
Accept
string
Requests a JSON response where the selected operation supports JSON.
Example:
"application/json"
X-Privacy-Mode
boolean
default:false
Optional privacy override. Turn this on to request that AvraAPI suppress request-payload storage in observability logs for this request.
Example:
true
Body
application/json
Documentation Playground request projection. The released API also supports a binary PDF response for backend and Postman integrations.
html
string
required
HTML source, limited to 512 KB after Base64 decoding when is_base64 is true.
Required string length: 1 - 524288
response_type
enum<string>
default:base64
required
Fixed to Base64 JSON for the Documentation Playground.
Available options:
base64
privacy_mode
enum<boolean>
default:true
required
Fixed on for the Documentation Playground request body.
Available options:
true
is_base64
boolean
default:false
When true, html is Base64-encoded HTML and is decoded before validation and rendering.
page_size
enum<string>
default:A4
Available options:
A4,
Letter,
Legal
orientation
enum<string>
default:portrait
Available options:
portrait,
landscape
margins
object
Page margins in millimetres.
Show child attributes
Response
Base64 PDF JSON envelope for the Documentation Playground.
success
enum<boolean>
required
Available options:
true
request_id
string<uuid>
required
Include this value when contacting AvraAPI support.
data
object
required
Operation-specific result data.
Show child attributes
Last modified on October 1, 2026
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"AvraAPI","description":"Official AvraAPI documentation for backend SDKs, microservice APIs, and Universal Payment Gateway integrations.","colors":{"primary":"#0450ff","light":"#3b82f6","dark":"#3b82f6"},"logo":{"light":"https://mintcdn.com/avraapi/m_1aZj30iaDgR5ok/logo/light.png?fit=max\u0026auto=format\u0026n=m_1aZj30iaDgR5ok\u0026q=85\u0026s=1e1ee08fd48f0cd836a53ca3afbcac7c","dark":"https://mintcdn.com/avraapi/m_1aZj30iaDgR5ok/logo/dark.svg?fit=max\u0026auto=format\u0026n=m_1aZj30iaDgR5ok\u0026q=85\u0026s=99972ab69fe3ea2a8c60fa0292dca4de"},"favicon":"https://mintcdn.com/avraapi/CI9RHnUBtfjY8Z3E/favicon.ico?fit=max\u0026auto=format\u0026n=CI9RHnUBtfjY8Z3E\u0026q=85\u0026s=06fc4ebdc219a34f50b1f571702dc728","api":{"playground":{"display":"interactive","proxy":false,"credentials":false},"examples":{"defaults":"required","languages":["curl","javascript","php"],"prefill":true}},"search":{"prompt":"Search AvraAPI documentation..."},"seo":{"metatags":{"canonical":"https://docs.avraapi.com","robots":"index, follow","googlebot":"index, follow","og:site_name":"AvraAPI","og:locale":"en_US","twitter:card":"summary_large_image","theme-color":"#0450ff"},"organization":{"id":"https://avraapi.com/#organization","name":"AvraAPI","legalName":"Fidex Developers (Pvt) Ltd","url":"https://avraapi.com","logo":"https://docs.avraapi.com/logo/light.png"},"indexing":"navigable"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"avraapi","hasAudioNarration":false,"actualSubdomain":"avraapi","customDomains":["docs.avraapi.com"],"gitSource":{"type":"github","owner":"avraapi","repo":"apix","deployBranch":"feature/universal_payment_gateway","contentDirectory":"docs/mintlify","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6abefef58bbeefc99d396eb1","clientVersion":"0.0.4277","searchFilterCounts":[{"language":"default","tag":"SDK Documentation","count":25},{"language":"default","tag":"Advanced Services","count":23},{"language":"default","tag":"Universal Payment Gateway","count":18},{"language":"default","tag":"REST API Reference","count":16},{"language":"default","tag":"Information \u0026 Guides","count":13},{"language":"default","tag":"Gateway-wise Functions","count":9},{"language":"default","tag":"Laravel SDK (v1.2.0)","count":8},{"language":"default","tag":"Node.js SDK (v1.2.0)","count":8},{"language":"default","tag":"PHP SDK (v1.5.2)","count":8},{"language":"default","tag":"Getting Started","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"info@avraapi.com"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"site-roles","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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"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":"turbopuffer-dual-write","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},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"images/payment-elements/playground.css","href":"/_mintlify/custom/avraapi/c9c507745cea4af5/images/payment-elements/playground.css"}]}
{"page":{"pagePath":"api-reference/utilities/pdf-generate","slug":"/api-reference/utilities/pdf-generate","pageMetadata":{"title":"Generate a PDF","description":"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/pdf/generate","playground":"interactive","href":"/api-reference/utilities/pdf-generate"},"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: \"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Render a small HTML document as a PDF. The default response is binary `,_jsx(_components.code,{children:`application/pdf`}),`; use `,_jsx(_components.code,{children:`response_type: \"base64\"`}),` only when your application needs the PDF inside a JSON envelope.`]}),`\n`,_jsxs(_components.p,{children:[`The Playground is deliberately limited to `,_jsx(_components.code,{children:`response_type: \"base64\"`}),` and returns the JSON envelope only. For a raw `,_jsx(_components.code,{children:`application/pdf`}),` response, use Postman or your backend integration.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Live Testing Guide:`}),` Before using `,_jsx(_components.strong,{children:`Try it`}),`, create a Development project, then enter its `,_jsx(_components.strong,{children:`Client ID`}),` and `,_jsx(_components.strong,{children:`Client Secret`}),`. Configure the relevant provider for that project before sending the request.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`HTML can contain invoice details, customer data, and other sensitive business information. Send `,_jsx(_components.code,{children:`X-Privacy-Mode: 1`}),` when that privacy guarantee is appropriate for the request. Never place Project Client Secrets in frontend code.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`api-endpoint`,children:`API endpoint`}),`\n`,_jsx(CodeBlock,{filename:`POST`,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://avraapi.com/api/v1/utilities/pdf/generate`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`request-fields`,children:`Request fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Rules`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`html`})}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`HTML source; 1–524,288 bytes after decoding when `,_jsx(_components.code,{children:`is_base64`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`is_base64`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Boolean. When `,_jsx(_components.code,{children:`true`}),`, send Base64-encoded HTML in `,_jsx(_components.code,{children:`html`}),`; AvraAPI decodes it before validation and rendering. Default `,_jsx(_components.code,{children:`false`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page_size`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`A4`}),` (default), `,_jsx(_components.code,{children:`Letter`}),`, or `,_jsx(_components.code,{children:`Legal`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`orientation`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`portrait`}),` (default) or `,_jsx(_components.code,{children:`landscape`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`margins.top`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Top margin in millimetres, from 0 to 100; default `,_jsx(_components.code,{children:`15`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`margins.right`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Right margin in millimetres, from 0 to 100; default `,_jsx(_components.code,{children:`15`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`margins.bottom`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Bottom margin in millimetres, from 0 to 100; default `,_jsx(_components.code,{children:`15`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`margins.left`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Left margin in millimetres, from 0 to 100; default `,_jsx(_components.code,{children:`15`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`response_type`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`binary`}),` (default) for `,_jsx(_components.code,{children:`application/pdf`}),`, or `,_jsx(_components.code,{children:`base64`}),` for a JSON response.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`privacy_mode`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Boolean request-level privacy setting. `,_jsx(_components.code,{children:`X-Privacy-Mode: 1`}),` is the shared universal override.`]})]})]})]}),`\n`,_jsx(_components.p,{children:`AvraAPI sanitizes the HTML before rendering. Treat the result as a document generated from your own content: keep complex document storage, delivery, and authorization in your backend.`}),`\n`,_jsx(Heading,{level:`2`,id:`request-example`,children:`Request example`}),`\n`,_jsxs(_components.p,{children:[`This request receives a real PDF stream. The `,_jsx(_components.code,{children:`--output`}),` option saves that binary response as a file.`]}),`\n`,_jsx(CodeBlock,{filename:`curl`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://avraapi.com/api/v1/utilities/pdf/generate\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-KEY: YOUR_PROJECT_CLIENT_ID\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-SECRET: YOUR_PROJECT_CLIENT_SECRET\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-ENV: development\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Privacy-Mode: 1\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/pdf\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"html\": \"\u003chtml>\u003cbody>\u003ch1>Order receipt\u003c/h1>\u003cp>ORDER-2026-001\u003c/p>\u003c/body>\u003c/html>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"page_size\": \"A4\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"orientation\": \"portrait\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"margins\": {\"top\": 15, \"right\": 15, \"bottom\": 15, \"left\": 15},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response_type\": \"binary\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --output`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` receipt.pdf`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`binary-pdf-response`,children:`Binary PDF response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`response_type: \"binary\"`}),` is the default. A successful request returns the PDF bytes with `,_jsx(_components.code,{children:`Content-Type: application/pdf`}),`, `,_jsx(_components.code,{children:`Content-Length`}),`, `,_jsx(_components.code,{children:`Cache-Control: no-store`}),`, `,_jsx(_components.code,{children:`Content-Disposition: inline; filename=\"apix-document.pdf\"`}),`, and `,_jsx(_components.code,{children:`X-APIX-Request-ID`}),` headers.`]}),`\n`,_jsx(_components.p,{children:`The PDF is the response body, not a JSON object. Use this mode from your backend, Postman, or another HTTP client that can handle binary media.`}),`\n`,_jsx(Heading,{level:`2`,id:`base64-json-response`,children:`Base64 JSON response`}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`response_type`}),` to `,_jsx(_components.code,{children:`base64`}),` when a JSON response is required. `,_jsx(_components.code,{children:`data.data`}),` contains Base64 PDF bytes; it is not a temporary download link and AvraAPI does not store an artifact for later retrieval through this API.`]}),`\n`,_jsx(CodeBlock,{filename:`curl`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://avraapi.com/api/v1/utilities/pdf/generate\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-KEY: YOUR_PROJECT_CLIENT_ID\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-SECRET: YOUR_PROJECT_CLIENT_SECRET\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-ENV: development\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Privacy-Mode: 1\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"html\": \"\u003chtml>\u003cbody>\u003ch1>Order receipt\u003c/h1>\u003cp>ORDER-2026-001\u003c/p>\u003c/body>\u003c/html>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response_type\": \"base64\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abd340d9-2491-4403-b076-51f395048c8d\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"base64\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"media_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"JVBERi0xLjcKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZw...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`The value above is intentionally truncated. A successful response carries the complete Base64 document. Decode it only in a protected backend or trusted application context; do not place PDF content containing sensitive data into browser logs, analytics, or public client state.`})}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`error.code`})}),_jsx(_components.th,{children:`When it happens`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`http_error`})})}),_jsx(_components.td,{children:`PDF rendering could not process the supplied HTML or a permitted external image.`}),_jsx(_components.td,{children:`Correct the document content and retry with a small controlled example first.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`unauthorized`})})}),_jsxs(_components.td,{children:[`Credentials are missing, invalid, inactive, or do not match `,_jsx(_components.code,{children:`X-ENV`}),`.`]}),_jsx(_components.td,{children:`Check your backend credential configuration.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`402`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`insufficient_funds`})})}),_jsx(_components.td,{children:`The selected PDF Generator integration requires credits that are unavailable.`}),_jsx(_components.td,{children:`Check the project balance and service configuration.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`validation_failed`})})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`html`}),` is missing, malformed Base64 was used with `,_jsx(_components.code,{children:`is_base64`}),`, or a field is outside its documented range or enum.`]}),_jsx(_components.td,{children:`Correct the request using the field details in the response.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`provider_selection_failed`})})}),_jsx(_components.td,{children:`No active HTML to PDF integration can be selected for the project environment.`}),_jsx(_components.td,{children:`Enable or configure the HTML to PDF Converter integration.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`rate_limit_exceeded`})})}),_jsx(_components.td,{children:`The configured request limit was reached.`}),_jsxs(_components.td,{children:[`Respect `,_jsx(_components.code,{children:`Retry-After`}),` when present.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`internal_error`})})}),_jsx(_components.td,{children:`The renderer could not complete unexpectedly.`}),_jsx(_components.td,{children:`Retain the request ID and retry only when your workflow permits it.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`503`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`project_paused`})})}),_jsx(_components.td,{children:`The project is paused.`}),_jsx(_components.td,{children:`Reactivate the project before retrying.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/api-reference/rest-api`,children:`REST API guide`}),` for shared credentials, privacy, and response-handling rules.`]}),`\n`,_jsx(Heading,{level:`2`,id:`playground-resources`,children:`Playground resources`}),`\n`,_jsx(_components.p,{children:`The generated reference below lists this endpoint’s API standard details: request fields, authorizations, and response schema. The complete integration guide, request and response examples, and endpoint-specific error handling are above.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate a PDF","description":"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/pdf/generate","playground":"interactive","href":"/api-reference/utilities/pdf-generate"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"API endpoint","slug":"api-endpoint","depth":2,"children":[]},{"title":"Request fields","slug":"request-fields","depth":2,"children":[]},{"title":"Request example","slug":"request-example","depth":2,"children":[]},{"title":"Binary PDF response","slug":"binary-pdf-response","depth":2,"children":[]},{"title":"Base64 JSON response","slug":"base64-json-response","depth":2,"children":[]},{"title":"Error codes","slug":"error-codes","depth":2,"children":[]},{"title":"Playground resources","slug":"playground-resources","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/avraapi/ec3b4381e9d0c5d2/images/payment-elements/playground.js"],"openApiReferenceData":{"operation":{"tags":["Utilities"],"operationId":"generatePdf","summary":"Generate a PDF from HTML","description":"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.","x-avraapi-operation-classification":"interactive-development","parameters":["818eea2b-ebc0-4c2c-bdca-9779a93dba43","11e3cc83-5e0a-4e12-8d6f-65067d2759e8","ae6c659e-04cd-4aee-85ce-a17b5221c29a"],"requestBody":"c026639b-899d-46e3-bc4d-5d2d1b0bdc78","responses":{"200":"ba80607c-3b67-47e7-baab-8cca02aab342","400":"0490673e-a830-498c-9a22-4c6c9647cd86","401":"005512ec-b2d5-47d8-8d1b-b97a29eb9945","402":"25a9d781-119c-419c-8208-1951cfdf0f14","422":"ea7fb619-2d00-4846-bd3f-d3f0491af8da","429":"ad2f5b70-70ac-43ef-b333-72571b848f46","500":"b0a7b270-751f-4be6-b23f-089b68e045f6","503":"39bf82a8-701b-495c-9dd8-ce596fc3f3e2"},"method":"post","type":"path","servers":["13fe6015-747e-4dae-bb20-620e83109976"],"security":["dba1cf01-89ab-45f1-a005-235bcd9b3c8d"],"path":"/utilities/pdf/generate","baseUrlOptions":["https://avraapi.com/api/v1"],"title":"Generate a PDF from HTML","codeSamples":[],"requestExampleLanguages":["bash","javascript","php"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.html":"\u003chtml>\u003cbody>\u003ch1>Order receipt\u003c/h1>\u003cp>ORDER-2026-001\u003c/p>\u003c/body>\u003c/html>","body.response_type":"base64","body.privacy_mode":true}],"disableProxy":true},"dependencies":{"parameters":{"818eea2b-ebc0-4c2c-bdca-9779a93dba43":{"name":"X-ENV","in":"header","required":false,"description":"Selects the Development credential environment. The Documentation Playground exposes Development values only; normal backend integrations may use their documented Production credentials outside this tool.","schema":{"type":"string","enum":["dev","development"],"default":"development","isRequired":false,"description":"Selects the Development credential environment. The Documentation Playground exposes Development values only; normal backend integrations may use their documented Production credentials outside this tool.","uniqueKey":"","typeLabel":"enum\u003cstring>"}},"11e3cc83-5e0a-4e12-8d6f-65067d2759e8":{"name":"Accept","in":"header","required":false,"description":"Requests a JSON response where the selected operation supports JSON.","schema":{"type":"string","example":"application/json","isRequired":false,"description":"Requests a JSON response where the selected operation supports JSON.","uniqueKey":"","typeLabel":"string"}},"ae6c659e-04cd-4aee-85ce-a17b5221c29a":{"name":"X-Privacy-Mode","in":"header","required":false,"description":"Optional privacy override. Turn this on to request that AvraAPI suppress request-payload storage in observability logs for this request.","schema":{"type":"boolean","default":false,"example":true,"isRequired":false,"description":"Optional privacy override. Turn this on to request that AvraAPI suppress request-payload storage in observability logs for this request.","uniqueKey":"","typeLabel":"boolean"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Documentation Playground request projection. The released API also supports a binary PDF response for backend and Postman integrations.","type":"object","required":["html","response_type","privacy_mode"],"properties":{"html":{"type":"string","minLength":1,"maxLength":524288,"description":"HTML source, limited to 512 KB after Base64 decoding when is_base64 is true.","x-default":"\u003chtml>\u003cbody>\u003ch1>Order receipt\u003c/h1>\u003cp>ORDER-2026-001\u003c/p>\u003c/body>\u003c/html>","isRequired":true,"uniqueKey":"html","typeLabel":"string"},"response_type":{"type":"string","enum":["base64"],"default":"base64","x-default":"base64","description":"Fixed to Base64 JSON for the Documentation Playground.","isRequired":true,"uniqueKey":"response_type","typeLabel":"enum\u003cstring>"},"privacy_mode":{"type":"boolean","enum":[true],"default":true,"x-default":true,"description":"Fixed on for the Documentation Playground request body.","isRequired":true,"uniqueKey":"privacy_mode","typeLabel":"enum\u003cboolean>"},"is_base64":{"type":"boolean","default":false,"x-default":false,"description":"When true, html is Base64-encoded HTML and is decoded before validation and rendering.","uniqueKey":"is_base64","typeLabel":"boolean"},"page_size":{"type":"string","enum":["A4","Letter","Legal"],"default":"A4","x-default":"A4","uniqueKey":"page_size","typeLabel":"enum\u003cstring>"},"orientation":{"type":"string","enum":["portrait","landscape"],"default":"portrait","x-default":"portrait","uniqueKey":"orientation","typeLabel":"enum\u003cstring>"},"margins":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":100,"default":15,"uniqueKey":"margins.top","typeLabel":"number"},"right":{"type":"number","minimum":0,"maximum":100,"default":15,"uniqueKey":"margins.right","typeLabel":"number"},"bottom":{"type":"number","minimum":0,"maximum":100,"default":15,"uniqueKey":"margins.bottom","typeLabel":"number"},"left":{"type":"number","minimum":0,"maximum":100,"default":15,"uniqueKey":"margins.left","typeLabel":"number"}},"description":"Page margins in millimetres.","uniqueKey":"margins","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"base64":{"title":"base64","summary":"Browser-safe Base64 JSON response","value":{"html":"\u003chtml>\u003cbody>\u003ch1>Order receipt\u003c/h1>\u003cp>ORDER-2026-001\u003c/p>\u003c/body>\u003c/html>","response_type":"base64","privacy_mode":true}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"ba80607c-3b67-47e7-baab-8cca02aab342":{"description":"Base64 PDF JSON envelope for the Documentation Playground.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","data"],"properties":{"success":{"type":"boolean","enum":[true],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","description":"Include this value when contacting AvraAPI support.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"data":{"type":"object","description":"Operation-specific result data.","required":["format","media_type","data"],"properties":{"format":{"type":"string","enum":["base64"],"isRequired":true,"uniqueKey":"data.format","typeLabel":"enum\u003cstring>"},"media_type":{"type":"string","enum":["application/pdf"],"isRequired":true,"uniqueKey":"data.media_type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","format":"byte","description":"Base64-encoded PDF bytes.","isRequired":true,"uniqueKey":"data.data","typeLabel":"string\u003cbyte>"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"base64":{"title":"base64","summary":"Base64 PDF response","value":{"success":true,"request_id":"abd340d9-2491-4403-b076-51f395048c8d","data":{"format":"base64","media_type":"application/pdf","data":"JVBERi0xLjcKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZw..."}}}},"exampleType":"examples"}},"exampleType":"examples"},"0490673e-a830-498c-9a22-4c6c9647cd86":{"description":"The generator could not process an otherwise valid request, such as an unsupported barcode payload or an unreachable QR logo URL.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"http_error":{"title":"http_error","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000025","error":{"code":"http_error","message":"The generator could not process the supplied input."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"005512ec-b2d5-47d8-8d1b-b97a29eb9945":{"description":"Missing, invalid, inactive, or environment-mismatched project credentials.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"unauthorized":{"title":"unauthorized","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000026","error":{"code":"unauthorized","message":"Project credentials were not accepted."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"25a9d781-119c-419c-8208-1951cfdf0f14":{"description":"The selected Utility integration requires credits that are not available.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"insufficient_funds":{"title":"insufficient_funds","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000027","error":{"code":"insufficient_funds","message":"The selected Utility integration has insufficient credits."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"ea7fb619-2d00-4846-bd3f-d3f0491af8da":{"description":"The request body is invalid, or the matching Utility integration cannot be resolved for the project environment.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"validation_failed":{"title":"validation_failed","summary":"Request validation error","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000022","error":{"code":"validation_failed","message":"Validation failed.","details":{"data":["The data field is required."]}}}},"unavailable_provider":{"title":"unavailable_provider","summary":"Utility provider is not available","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000023","error":{"code":"provider_selection_failed","message":"No active generator integration is available for this project environment."}}}},"exampleType":"examples"}},"exampleType":"examples"},"ad2f5b70-70ac-43ef-b333-72571b848f46":{"description":"The configured request limit has been reached.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}},"Retry-After":{"description":"Seconds to wait before retrying a rate-limited request.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"rate_limit_exceeded":{"title":"rate_limit_exceeded","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000029","error":{"code":"rate_limit_exceeded","message":"The request limit has been reached."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"b0a7b270-751f-4be6-b23f-089b68e045f6":{"description":"The Utility operation could not complete unexpectedly.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"internal_error":{"title":"internal_error","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000028","error":{"code":"internal_error","message":"The Utility operation could not complete."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"39bf82a8-701b-495c-9dd8-ce596fc3f3e2":{"description":"The project is paused.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"project_paused":{"title":"project_paused","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000024","error":{"code":"project_paused","message":"This project is currently paused."}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"dba1cf01-89ab-45f1-a005-235bcd9b3c8d":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Your Development project's Client ID. Enter your own value in the Documentation Playground.","scopes":[]},"ApiSecretHeader":{"type":"apiKey","in":"header","name":"X-API-SECRET","description":"Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.","scopes":[]}}},"servers":{"13fe6015-747e-4dae-bb20-620e83109976":{"url":"https://avraapi.com/api/v1","description":"AvraAPI REST API v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Your Development project's Client ID. Enter your own value in the Documentation Playground.","scopes":[]},"schema":{"title":"X-API-KEY","type":"string","description":"Your Development project's Client ID. Enter your own value in the Documentation Playground.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyHeader","name":"X-API-KEY"},{"scheme":{"type":"apiKey","in":"header","name":"X-API-SECRET","description":"Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.","scopes":[]},"schema":{"title":"X-API-SECRET","type":"string","description":"Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiSecretHeader","name":"X-API-SECRET"}],"title":"ApiKeyHeader \u0026 ApiSecretHeader"}]},"originalFileLocation":"api-reference/provider-api.openapi.yaml"},"subdomain":"avraapi","siteName":"AvraAPI","title":"Generate a PDF - AvraAPI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T13:37:07.619Z","originalFileLocation":"api-reference/utilities/pdf-generate.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=\"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AvraAPI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_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/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_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/avraapi/hBrlc_a6OxL2-jI-/_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/avraapi/hBrlc_a6OxL2-jI-/_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/avraapi/hBrlc_a6OxL2-jI-/_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/avraapi/hBrlc_a6OxL2-jI-/_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/avraapi/hBrlc_a6OxL2-jI-/_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/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate a PDF - AvraAPI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AvraAPI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.avraapi.com/api-reference/utilities/pdf-generate\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://avraapi.mintlify.site/_mintlify/api/og/v2?division=Utilities\u0026amp;title=Generate+a+PDF\u0026amp;description=Render+HTML+as+a+binary+PDF+or+a+Base64+JSON+response+through+your+configured+AvraAPI+PDF+Generator.\u0026amp;theme=d9e89b2eca5511b6e2827c0b\u0026amp;signature=a7a3e5f3525e941f17f303618253b31656a1ba5378493402c7c9116fb0ddc683\">\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=\"Generate a PDF - AvraAPI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://avraapi.mintlify.site/_mintlify/api/og/v2?division=Utilities\u0026amp;title=Generate+a+PDF\u0026amp;description=Render+HTML+as+a+binary+PDF+or+a+Base64+JSON+response+through+your+configured+AvraAPI+PDF+Generator.\u0026amp;theme=d9e89b2eca5511b6e2827c0b\u0026amp;signature=a7a3e5f3525e941f17f303618253b31656a1ba5378493402c7c9116fb0ddc683\">\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/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AvraAPI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0450ff\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"googlebot\" content=\"index, follow\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#0450ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.avraapi.com/api-reference/utilities/pdf-generate\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/utilities/pdf-generate.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://avraapi.com/#organization\",\"name\":\"AvraAPI\",\"legalName\":\"Fidex Developers (Pvt) Ltd\",\"url\":\"https://avraapi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.avraapi.com/logo/light.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.avraapi.com#website\",\"name\":\"AvraAPI\",\"url\":\"https://docs.avraapi.com\",\"publisher\":{\"@id\":\"https://avraapi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.avraapi.com/api-reference/utilities/pdf-generate#webpage\",\"url\":\"https://docs.avraapi.com/api-reference/utilities/pdf-generate\",\"name\":\"Generate a PDF\",\"description\":\"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.\",\"dateModified\":\"2026-10-01T13:37:07.619Z\",\"isPartOf\":{\"@id\":\"https://docs.avraapi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.avraapi.com/api-reference/utilities/pdf-generate#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.avraapi.com/api-reference/utilities/pdf-generate#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Utilities\",\"item\":\"https://docs.avraapi.com/api-reference/utilities/qr-generate\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate a PDF\",\"item\":\"https://docs.avraapi.com/api-reference/utilities/pdf-generate\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.avraapi.com/api-reference/utilities/pdf-generate#apireference\",\"headline\":\"Generate a PDF\",\"name\":\"Generate a PDF\",\"description\":\"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.\",\"url\":\"https://docs.avraapi.com/api-reference/utilities/pdf-generate\",\"mainEntityOfPage\":{\"@id\":\"https://docs.avraapi.com/api-reference/utilities/pdf-generate#webpage\"},\"dateModified\":\"2026-10-01T13:37:07.619Z\",\"publisher\":{\"@id\":\"https://avraapi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.avraapi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AvraAPI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AvraAPI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/utilities/pdf-generate.md","siteName":"AvraAPI","nav":{"global":null,"tabs":[{"tab":"Information \u0026 Guides","icon":"book-open","pages":[{"title":"Information \u0026 Guides","href":"/introduction"}]},{"tab":"Advanced Services","icon":"wand-magic-sparkles","pages":[{"title":"Advanced Services","href":"/universal-payment-gateway/overview"}]},{"tab":"SDK Documentation","icon":"code","pages":[{"title":"SDK Documentation","href":"/sdk/overview"}]},{"tab":"REST API Reference","icon":"server","groups":[{"group":"Introduction","pages":[{"title":"API Reference overview","icon":"map","href":"/api-reference/overview"},{"title":"Providers \u0026 Microservices","icon":"book-open","href":"/api-reference/providers-and-microservices"},{"title":"REST API guide","icon":"terminal","href":"/api-reference/rest-api"}]},{"group":"Currencies","pages":[{"title":"CBSL Rates","icon":"landmark","href":"/api-reference/cbsl-rates"},{"title":"List supported currency codes","openapi":"api-reference/provider-api.openapi.yaml GET /utility/currency/codes","playground":"interactive","href":"/api-reference/currency/list-codes"},{"title":"Get latest rates","openapi":"api-reference/provider-api.openapi.yaml GET /utility/currency/latest/{base}","playground":"interactive","href":"/api-reference/currency/latest-rates"},{"title":"Get one currency-pair rate","openapi":"api-reference/provider-api.openapi.yaml GET /utility/currency/pair/{base}/{target}","playground":"interactive","href":"/api-reference/currency/pair-rate"},{"title":"Convert a currency amount","openapi":"api-reference/provider-api.openapi.yaml GET /utility/currency/pair/{base}/{target}/{amount}","playground":"interactive","href":"/api-reference/currency/convert-amount"}]},{"group":"SMS","pages":[{"title":"Check SMS balance","openapi":"api-reference/provider-api.openapi.yaml POST /sms/balance","playground":"interactive","href":"/api-reference/sms/balance"},{"title":"Send an SMS","openapi":"api-reference/provider-api.openapi.yaml POST /sms/send","playground":"interactive","href":"/api-reference/sms/send"}]},{"group":"Security","pages":[{"title":"Check VPN, proxy, and IP risk","openapi":"api-reference/provider-api.openapi.yaml POST /security/vpn-shield","playground":"interactive","href":"/api-reference/security/vpn-shield"},{"title":"Check a disposable email address","openapi":"api-reference/provider-api.openapi.yaml POST /security/burner-email-shield","playground":"interactive","href":"/api-reference/security/burner-email-shield"}]},{"group":"Location","pages":[{"title":"Look up an IP address","openapi":"api-reference/provider-api.openapi.yaml POST /location/lookup","playground":"interactive","href":"/api-reference/location/lookup"}]},{"group":"Utilities","pages":[{"title":"Generate a QR code","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/qr/generate","playground":"interactive","href":"/api-reference/utilities/qr-generate"},{"title":"Generate a barcode","description":"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/barcode/generate","playground":"interactive","href":"/api-reference/utilities/barcode-generate"},{"title":"Generate a PDF","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/pdf/generate","playground":"interactive","href":"/api-reference/utilities/pdf-generate"}]}]}]},"basePath":"","title":"Generate a PDF - AvraAPI","deploymentId":"dpl_BzgRxZmUbhHRoPLkBx1DiVRSyQhV","buildId":"dpl_BzgRxZmUbhHRoPLkBx1DiVRSyQhV","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CtBVvVHw.js","snippetPresets-9Wdj1iJX.js","utils-C7pdn048.js","style-to-object-BY3JEAdk.js","utils-DXrrd362.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-mhMleBMB.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BAjduu_G.js","_Uint8Array-nYbT9fMe.js","isObject-FP1Yky1u.js","ApiExamples-B_rQ3sQn.js","usePlaygroundInputsStore-1axgsDkN.js","shallow-BzGYy3WT.js","isEqual-YKdP-BC9.js","CodeSnippets-Bnk9aSsZ.js","CodeSnippet-CpmxV9bB.js","getApiPlaygroundDisplay-bJKEwju4.js","Page-B3Xw2AdP.js","DynamicMarkdown-hgwwGkem.js","SectionHeading-D_cNZKTp.js","icon-Bt9132nT.js","MethodPill-bMPQiifO.js","getPastedJson-B4rstRhU.js","Check2Icon-D82b8qKN.js","axios-CsQoIw0U.js","Markdown-0sfW67Ea.js","AssistantPageLink-B0docfb1.js","dist-DAabPqRJ.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}