---
title: "Generates a PDF document from HTML and web technologies."
method: POST
path: "/pdf/generate/"
tags: ["PDF"]
---

# Generates a PDF document from HTML and web technologies.

`POST /pdf/generate/`

Generates a PDF document from web assets.

## Response `201`

PDF Document generated successfully

- object
  - `url` string, uri, required — URL to the generated PDF document

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `500` — Internal server error
- `502` — Bad Gateway

## Changes

- **2024-09-06** `a5a51ce2a2fd` — 1 info
  - added the new optional request property `options/allowViewing`
- **2024-06-03** `d292b8ba831c` — 1 info
  - the request property `options` became optional
- **2024-05-31** `f53cbf3e2593` — 1 info
  - api operation id `generatePDFDocument` was added
- **2024-05-07** `89913b501ee8` — 1 breaking, 1 warning, 9 info
  - removed the success response with the status `200`
  - removed the request property `options/world`
  - added the new optional request property `options/expiresAt`
  - added the new optional request property `options/fileName`
  - …7 more
- **2024-04-13** `c10115bc1723` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/onedoclabs/apis/fileforge-api/changes/pdf/generate/post.md)

---

[API](https://skmtc.dev/onedoclabs/apis/fileforge-api.md) · [All operations](https://skmtc.dev/onedoclabs/apis/fileforge-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/onedoclabs/fileforge-api/revisions/a5a51ce2a2fd/schema)
