Document
A document project makes things meant for paper or a PDF: proposals, reports, quotes, one-pagers. Your users design on a page of real paper size and see where each page ends.
What your users choose
| Setting | Choices |
|---|---|
| Paper | A4, Letter, Legal or A5, portrait or landscape |
| Margins | Top, right, bottom and left, in millimetres (up to 60mm each) |
| Header and footer | A line of text printed on every page, aligned left, centre or right |
| Page numbers | On or off, left, centre or right, with or without the total ("2 / 5") |
| Page breaks | Any section can start a new page |
Getting it out
The usual format is PDF, printed on the chosen paper, with its header, footer and page numbers on every page:
const pdf = await editor.exportPdf();
// pdf.url — fetch the file from here
// pdf.filename — e.g. 'q3-proposal.pdf'
// pdf.bytes — its size
// pdf.expiresAt — null while the file is kept
const file = await fetch(pdf.url).then((r) => r.blob());
From your server:
const pdf = await lettrove.designs.export(designId, { user: { id: userId }, format: 'pdf' });
| Format | From the page | From your server | In the Download menu |
|---|---|---|---|
exportPdf() | format: 'pdf' | yes | |
| HTML (print-ready) | exportHtml() | designs.export(id, { user }) | yes |
| Plain text | exportPlainText() | in designs.export's text | yes |
| PNG | exportImage() | format: 'png' | yes |
| ZIP | exportZip() | format: 'zip' | yes |
The HTML export is print-ready too: opened in a browser and printed (or "Save as PDF"), it comes out on the same paper with the same page breaks. The header, footer and page numbers print from Chrome and Edge; other browsers print the pages without them. For a file to hand to someone, use the PDF.
Good to know
- The editor has no phone preview for documents: paper does not change size.
- Forms are not offered in documents.