# Sync mode

Sync mode is the easier way to get your PDF immediately within a single API call, and your PDF file is ready to be distributed.

Sync mode will be protected under our [Rate Limiting policy](https://docs.renderpdf.io/rate-limiting).

{% hint style="success" %}
If you're looking for performance, fast, and don't need to implement your own Rate Limiting layer, check out the [Async Mode](https://docs.renderpdf.io/render-pdfs/renderpdf-apis/async-mode).&#x20;
{% endhint %}

### Endpoint

`POST https://renderpdf.io/api/pdfs/render-sync`

### Content-Type

**JSON** or **FormData**.

### Body

<table><thead><tr><th width="423">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>htmlContent (string - <strong>required</strong>)</td><td>The content that you want to render</td></tr><tr><td>headerHtmlContent (string - default: <strong>null</strong>)</td><td>The header of the PDF file (visible for pages)</td></tr><tr><td>footerHtmlContent (string - default: <strong>null</strong>)</td><td>The footer of the PDF file (visible for pages)</td></tr><tr><td>landscape (boolean - default: <strong>false</strong>)</td><td>Render in landscape or portrait</td></tr><tr><td>paperWidth (string|number - default: <strong>8.5in</strong>)</td><td>Specify paper width using units like 72pt, 96px, 1in, 25.4mm, 2.54cm, or 6pc. Default unit is inches if unspecified.</td></tr><tr><td>paperHeight (string|number - default: <strong>11in</strong>)</td><td>Specify paper height using units like 72pt, 96px, 1in, 25.4mm, 2.54cm, or 6pc. Default unit is inches if unspecified.</td></tr><tr><td>marginTop (string|number - default: <strong>0.39in</strong>)</td><td>Specify top margin width using units like 72pt, 96px, 1in, 25.4mm, 2.54cm, or 6pc. Default unit is inches if unspecified.</td></tr><tr><td>marginLeft (string|number - default: <strong>0.39in</strong>)</td><td>Specify left margin width using units like 72pt, 96px, 1in, 25.4mm, 2.54cm, or 6pc. Default unit is inches if unspecified.</td></tr><tr><td>marginRight (string|number - default: <strong>0.39in</strong>)</td><td>Specify right margin using units like 72pt, 96px, 1in, 25.4mm, 2.54cm, or 6pc. Default unit is inches if unspecified.</td></tr><tr><td>marginBottom (string|number - default: <strong>0.39in</strong>)</td><td>Specify bottom margin using units like 72pt, 96px, 1in, 25.4mm, 2.54cm, or 6pc. Default unit is inches if unspecified.</td></tr><tr><td>printBackground (boolean - default: <strong>false</strong>)</td><td>Print the background graphics.</td></tr><tr><td>scale (string|number - default: <strong>1.0</strong>)</td><td>The scale of the page rendering.</td></tr></tbody></table>

{% hint style="info" %}
Learn more about `htmlContent`, `headerHtmlContent`, and `footerHtmlContent` [here](https://docs.renderpdf.io/render-pdfs/template-and-styling)
{% endhint %}

### Available Error Responses

* `422` when you have any invalid request data. E.g.: missing htmlContent, wrong scale number, etc.
* `400` with `RENDER_PDF_FAILED` outcome, if we are unable to render your content (due to anything)
* `429` when you used all of your available requests in a 1-minute window.
