Skip to content
PressJetDocs Docs v0.1.0-beta.9 GitHub
Edit this page
Source docs v0.1.0-beta.9 Install v0.1.0-beta.7

Edit a template in the browser

Use the PressJet template builder to compose a document from pages and blocks. Drag a block by its handle, or select it and use Move up and Move down. Add text, images, tables, running headers and footers, form controls, and blank signature fields. Use the document panel to set page size, margins, language, and accessibility. Form controls take their keyboard order from the authored document when using PDF/UA. On mobile, use Edit to choose a block, Properties to edit it and Preview to inspect the PDF.

Open JSON variables to set preview data. For a text block, enter a Text from JSON key to substitute a scalar. Set Repeat for each item at key to expand the block for each object in an array. Set Show when JSON key is true to make it conditional. Inside a repeat, keys refer to the current row. Repeated form field names use the row index, so each row can be filled independently. Use Block source for the underlying version 1 tuples and their supported properties.

Import a compact PressJet template with "v": 1 or a saved editor template with "version": 1. Save template downloads the editable definition in the editor format. Download PDF downloads the bytes of the current preview revision generated by the browser's PressJet WASM worker. Review the preview after changing template data, especially after expanding a table or repeat.

For a local checkout, build the static site's WASM runtime with scripts/build-site-runtime.sh after building the TypeScript SDK and the pressjet-wasm crate. Serve web/ and open template-builder/. The host should serve .wasm as application/wasm.