PDFMonkey.ioPricingSign inGet started for FREE
Search…
PDFMonkey Documentation
Guides
From zero to generating your first Document
Generating your first Document with Zapier
Making your first API call
PDFMonkey Features
Automatic deletion (TTL)
Share links
Webhooks
Frequent questions
Troubleshooting
What can you do with PDFMonkey?
What happens if I use all of my quota?
How do I change my password?
How do I delete my account?
Authoring Templates
Privacy and security
Compliance
How-tos
Adding a header or footer to your document
Including images in your documents
Styling your documents
Using different fonts
Using JavaScript
Set the filename of the generated Document
Change the size of the page and its margins
How to force a single page or use a full-page background
Integrations
List of integrations
Zapier
Integromat
Workato
Ruby SDK
References
The Document Lifecycle
Liquid Reference
API Reference
Powered By GitBook
Set the filename of the generated Document
When you generate a Document you might sometimes need to give it a specific name. To do so, you can provide the filename to use through the Document's meta-data:
1
{
2
"_filename": "some-custom-name.pdf"
3
}
Copied!
When calling the API, this should be sent using the meta property of the Document:
1
{
2
"document": {
3
"document_template_id": "...",
4
"payload": "{ ... }",
5
"meta": "{ \"_filename\": \"some-custom-name.pdf\" }"
6
}
7
}
Copied!
Previous
Debugging your JavaScript
Next - How-tos
Change the size of the page and its margins
Last modified 4mo ago
Copy link