---
title: "Generate a blank PDF server-side | Nutrient"
canonical_url: "https://www.nutrient.io/guides/document-engine/pdf-generation/from-html/blank-pdf/"
md_url: "https://www.nutrient.io/guides/document-engine/pdf-generation/from-html/blank-pdf.md"
last_updated: "2026-05-25T09:22:39.179Z"
description: "Learn how to create a blank PDF using HTML and the PDF Generation API. Step-by-step guide for seamless document creation and management."
---

# Generate a blank PDF

This guide will take you through the process of generating a blank PDF using the PDF Generation feature.

## Document content

To generate a blank PDF, you can supply some HTML that renders as an empty page, like so:

```html

<!DOCTYPE html>
<html>
</html>

```

## PDF generation

Next, send the above HTML to Document Engine for generation. Use the [`/api/documents`](https://www.nutrient.io/api/reference/document-engine/upstream/#tag/Documents/operation/upload-document) endpoint, sending the [PDF Generation schema](https://www.nutrient.io/guides/document-engine/pdf-generation/from-html/schema.md) with the HTML file from above:

### CURL

```bash

curl -X POST http://localhost:5000/api/documents \
  -H 'Authorization: Token token=<API token>' \
  -F document_id=blank-document \
  -F generation='{ "html": "page.html" }' \
  -F page.html=@/path/to/page.html

```

### HTTP

```http

POST /api/documents HTTP/1.1
Authorization: Token token=<API token>
Content-Type: multipart/form-data; boundary=customboundary

--customboundary
Content-Disposition: form-data; name="document_id";

blank-document
--customboundary
Content-Disposition: form-data; name="generation";
Content-Type: application/json

{ "html": "page.html" }
--customboundary
Content-Disposition: form-data; name="page.html" filename="page.html";
Content-Type: text/html

<HTML data>
--customboundary

```

After performing the above `curl` command, you can view the generated document in the Server dashboard at http://localhost:5000/dashboard/documents/blank-document:![A blank PDF](@/assets/guides/document-engine/pdf-generation/blank-document.png)

Using the [PDF Generation schema](https://www.nutrient.io/guides/document-engine/pdf-generation/from-html/schema.md), you can control the page size you want to create. In this example, you create the page in letter size:

### CURL

```bash

curl -X POST http://localhost:5000/api/documents \
  -H 'Authorization: Token token=<API token>' \
  -F document_id=blank-document \
  -F generation='{ "html": "page.html", "layout": { "size": "Letter"} }' \
  -F page.html=@/path/to/page.html

```

### HTTP

```http

POST /api/documents HTTP/1.1
Authorization: Token token=<API token>
Content-Type: multipart/form-data; boundary=customboundary

--customboundary
Content-Disposition: form-data; name="document_id";

blank-document
--customboundary
Content-Disposition: form-data; name="generation";
Content-Type: application/json

{ "html": "page.html", "layout": { "size": "Letter"} }
--customboundary
Content-Disposition: form-data; name="page.html" filename="page.html";
Content-Type: text/html

<HTML data>
--customboundary

```
---

## Related pages

- [Java](/guides/document-engine/pdf-generation/from-html/java.md)
- [JavaScript](/guides/document-engine/pdf-generation/from-html/javascript.md)
- [Edit a generated PDF](/guides/document-engine/pdf-generation/from-html/edit-a-generated-pdf.md)
- [Python](/guides/document-engine/pdf-generation/from-html/python.md)
- [Create PDFs from scratch](/guides/document-engine/pdf-generation/from-html/from-scratch.md)
- [Generate fillable PDF forms from HTML](/guides/document-engine/pdf-generation/from-html/fillable-pdf-forms.md)
- [Customize the page header and footer](/guides/document-engine/pdf-generation/from-html/page-header-footer.md)
- [PHP](/guides/document-engine/pdf-generation/from-html/php.md)
- [HTML-to-PDF conversion server sample code](/guides/document-engine/pdf-generation/from-html/sample-code.md)
- [HTML template design for generating PDFs](/guides/document-engine/pdf-generation/from-html/template-design.md)
- [HTML-to-PDF generation schema](/guides/document-engine/pdf-generation/from-html/schema.md)

