# Generating Documents

Generate documents from your templates with PDFMonkey: statuses, download URLs, share links, webhooks, image output, retention and deletion.


> [!TIP]
> **Before you start**
>
> To generate a document, you first need a template. You can create one using the [visual Builder](../builder-templates/) or with [HTML, CSS, and Liquid code](../code-templates/).




- [Generate Documents from the Dashboard](https://pdfmonkey.io/docs/generating-documents/using-the-dashboard.md): Generate PDF documents manually through the PDFMonkey dashboard. Create a document from a template, fill in the dynamic data payload, and download the result.
- [Generate PDFs with the API](https://pdfmonkey.io/docs/generating-documents/api-pdf-generation.md): Generate PDF documents programmatically using the PDFMonkey REST API with code examples in curl, Ruby, Node.js, Python, and PHP.
- [Convert HTML to PDF with the PDFMonkey API](https://pdfmonkey.io/docs/generating-documents/html-to-pdf.md): Use PDFMonkey as an HTML-to-PDF API: send your own HTML in the payload, render it with a minimal code template and get a file back, no templating needed.
- [Generate PDFs with No-Code Integrations](https://pdfmonkey.io/docs/generating-documents/using-an-integration.md): Generate PDF documents without writing code using Zapier, Make, n8n, and other automation platforms. Connect PDFMonkey to your existing tools in minutes.
- [Document Statuses and Lifecycle](https://pdfmonkey.io/docs/generating-documents/document-statuses.md): Every PDFMonkey document goes through draft, pending, generating, success or failure. Learn what each status means and how to handle failed documents.
- [Document Download URLs and Expiry](https://pdfmonkey.io/docs/generating-documents/download-url.md): PDFMonkey download URLs are signed links valid for one hour. Learn how they work, how to refresh an expired URL and how to store your generated files.
- [Set a Custom Filename for Generated Documents](https://pdfmonkey.io/docs/generating-documents/custom-filename.md): Control the filename of PDFs and images generated by PDFMonkey. Pass the _filename key in document metadata via the API or Dashboard.
- [Password-Protect Generated PDFs](https://pdfmonkey.io/docs/generating-documents/pdf-password-protection.md): Generate password-protected PDFs with PDFMonkey. Pass the _password key in document metadata via the API or Dashboard to encrypt files with AES-256.
- [Generate Images Instead of PDFs](https://pdfmonkey.io/docs/generating-documents/output-format.md): PDFMonkey can generate WebP, PNG and JPG images as well as PDFs. Create an image template, set dimensions and transparency, and tune the output.
- [Generate Factur-X Electronic Invoices](https://pdfmonkey.io/docs/generating-documents/electronic-invoicing.md): Generate Factur-X compliant electronic invoices with PDFMonkey. Apply a compliance format to your template and get a PDF/A-3 with embedded, validated XML.
- [Permanent Share Links for Generated Documents](https://pdfmonkey.io/docs/generating-documents/share-links.md): Share generated documents with a permanent public URL that never expires. No login needed. Available on Pro+ and Premium plans and during the trial.
- [Document Retention and Automatic Deletion (TTL)](https://pdfmonkey.io/docs/generating-documents/retention-and-deletion.md): Control how long PDFMonkey keeps your generated documents: set a per-template TTL, check your plan’s retention limit and see what data gets deleted.
- [Webhooks: Get Notified When Documents Are Ready](https://pdfmonkey.io/docs/generating-documents/webhooks.md): Set up webhooks to get notified when PDFMonkey documents finish generating: payload format, event types, channel routing and signature checks.
- [Embedding a Document Preview](https://pdfmonkey.io/docs/generating-documents/embedding-a-preview.md): Embed a live PDF preview of any PDFMonkey document — including drafts — directly in your app using an iframe and the preview_url field.
