Canvas editor
Design image templates in the dashboard, with artboard sizes, text that fits its box, images, QR codes, barcodes, charts, auto layout and constraints. Covers dynamic properties, sample data, previews, publishing, keyboard shortcuts and limits.
The canvas editor is where you design image templates: social cards and Open Graph images, email headers, display ads, certificates, badges and labels. You place elements on an artboard and mark the properties that change from render to render as dynamic. Then you render the template through the API with your data. Canvas templates render to PNG (the default), JPEG, WebP or PDF.
The editor's instant preview and our renderer draw the design with the same scene renderer, so what you see in the editor is what the API returns. PDF templates written in HTML and CSS use the other editor, see Template language.
Create an image template
- In the dashboard, choose New template → Blank image for an empty 1200 × 630 canvas. Pick another size under Artboard.
- Or filter the gallery by Format → Image and choose Use this template on one of the image templates: Open Graph images, email headers, display ads, testimonials, sale banners and event cards.
In the dashboard, image templates have the type Image (image_canvas in the API). The editor needs a desktop-width window; on smaller screens the dashboard shows a notice instead.
The editor at a glance
| Area | What's there |
|---|---|
| Top bar | Preview, Publish, API (⌘J: ready-made requests for this template) and More actions: Duplicate template, Export bundle, Revert draft to live version, Keyboard shortcuts, Open documentation, Download PNG, Copy JSON example |
| Toolbar | The tools (Select, Hand, Text, Rectangle, Ellipse, Line, Image, Frame), Undo and Redo, grouping, auto layout, alignment and distribution, order, snapping, the sample-data switch, the server preview, Export and zoom |
| Left panel | Layers, the element tree: drag to reorder or to move into a frame, rename, search, hide and lock. Elements: everything you can add |
| Canvas | The artboard. The bottom bar shows its size, the selection, scene problems and the zoom, and switches Rulers, Pixel grid and Pixel preview (Off, 1×, 2×) |
| Right panel | Design: the properties of the selection, or of the artboard when nothing is selected. Data: dynamic properties and sample data. Preview: instant and server previews |
The panels can be resized, and the editor remembers their widths.
Artboard and output
With nothing selected, the Design tab shows the artboard and the output settings.
-
Size. Pick a preset or enter a custom size, up to 8000 × 8000 px. The presets are:
Group Presets Web Open Graph 1200 × 630, Email header 600 × 200, Full HD 1920 × 1080 Social X/Twitter 1600 × 900, Instagram square 1080 × 1080, Instagram portrait 1080 × 1350, Story 1080 × 1920, LinkedIn 1200 × 627, Facebook 1200 × 630, Pinterest 1000 × 1500, YouTube 1280 × 720 Ads Leaderboard 728 × 90, Medium rectangle 300 × 250, Wide skyscraper 160 × 600 Print Certificate 1754 × 1240, A4 portrait 794 × 1123, Name badge 600 × 900, Shipping label 384 × 576 -
Background. None (transparent), a solid colour, a linear or radial gradient, or an image.
-
Default format. PNG, JPEG, WebP or PDF. Renders use it unless the request names another format; see Render with your data.
-
Scale. The output is the artboard size times the scale. The API accepts 1 to 3; 2 gives sharp images on high-density screens.
-
Quality. For JPEG and WebP. Without a value, renders use 85 for JPEG and 80 for WebP.
-
Transparent background. For PNG and WebP. The file then has no artboard background at all; the instant preview doesn't show this, the server preview does.
-
File name. The name of the rendered file.
A PDF from a canvas template is one page at the artboard size, converted at 96 px per inch. It is billed like any PDF render, and it can't be PDF/UA. See Plans and limits.
Elements
Add elements from the Elements tab: a click places one in the middle of the view, inside the selected frame, or drag it onto the canvas. The tools in the toolbar draw text, rectangles, ellipses, lines, images and frames directly.
| Group | Elements |
|---|---|
| Text | Heading, Subheading, Body text |
| Shapes | Rectangle, Rounded rectangle, Ellipse, Triangle, Polygon, Star, Line, Arrow |
| Images | Upload, workspace assets, stock photos or an image URL, see Images |
| Components | QR code, Barcode, Rating, Progress bar, Progress ring, Bar chart, Line chart, Pie chart, Donut chart |
| Layout | Frame, Auto-layout stack |
| Icons | A search over the Lucide icon set; the icon is stored in the template |
Every element has a position, size and rotation, can be flipped and skewed, and has opacity, a blend mode, up to 8 drop or inner shadows and a layer blur. Shapes and frames take a fill (solid, linear or radial gradient, or an image) and a stroke with dashes, line ends, corner joins and a position inside, centred on or outside the edge. Rectangles and frames can round each corner separately.
| Element | What you can set |
|---|---|
| Text | Font, weight, italic, size, line height, letter spacing, colour, underline and strikethrough, horizontal and vertical alignment, case, direction (auto, left to right, right to left), a background box per text or per line, highlight and outline. Double-click the text to format part of it. Named styles keep formatting consistent |
| QR code | Content up to 2,953 characters, error correction L, M, Q or H, module and finder styles, colours or a gradient, the quiet zone, and a logo in the middle. A logo needs error correction Q or H, or the code may not scan |
| Barcode | Code 128, GS1-128, EAN-8, EAN-13, UPC-A, UPC-E, ITF-14, Code 39, Code 93, Codabar, Data Matrix, PDF417 and Aztec, with human-readable text in OCR-A or OCR-B |
| Chart | Bar, horizontal bar, line, area, pie, donut, radar, scatter and gauge charts with labels and series, a title, palette, legend, values, axes, stacking and smoothing. Advanced ECharts option merges your own JSON into the chart's options |
| Rating | 1 to 20 stars, hearts, circles, squares or a custom shape, in whole or half steps, or exact |
| Progress | A bar or a ring, with a label as a percentage, the value or a fraction |
| Line | Start and end caps: arrow, triangle, circle, square, bar or diamond |
| Polygon and star | 3 to 100 sides or points, with rounded corners |
| Ellipse | Arcs and rings |
| Icon | Inline SVG or a URL, recoloured, fitted with contain, cover or stretch |
Text that fits its box
A text box can grow with its text (Auto width, Auto height) or keep a Fixed size. For text that comes from your data, two settings keep the design intact:
- Auto-fit sets a minimum and maximum font size. Each render uses the largest size between them at which the text fits the box.
- Max lines and Overflow cut text that is still too long, with an ellipsis if you like.
Text that is cut off, or that overflows its box, is reported with the warning text_overflow.
Frames, auto layout and constraints
A frame groups elements in a container with its own fill, stroke and corner radius, and can clip what sticks out (Clip content).
With auto layout, a frame arranges its children in a row or a column, with a gap, padding, alignment and distribution. Each child is Fixed, Hug contents or Fill container. A badge whose background grows with its text is a frame with auto layout around a text element.
Constraints decide how an element moves or resizes when the element it's attached to changes size: per axis left or top, centre, right or bottom, stretch, or scale. An element can be attached to its parent or, with Anchor, to another element, for example a price tag that stays to the right of a headline of any length. Constraints don't apply to children that auto layout arranges.
Images
The image picker has these tabs:
- Upload image: PNG, JPEG, WebP, GIF or SVG up to 10 MB, kept in the workspace's assets
- Workspace assets: images uploaded before
- Stock photos: a search over Unsplash and Pexels, where your dashboard offers it
- Image URL: any public image address
You can also drop an image file on the canvas or paste an image URL. Images from other websites reach the editor through our image proxy, up to 20 MB each.
| Setting | Options |
|---|---|
| Fit | Cover (the default), Contain, Stretch, Original size, Smart crop, Focal point (click the spot to keep in view), and zoom |
| Filters | Presets (Vintage, Warm, Cool, Mono, Fade, Dramatic, Noir) and sliders for brightness, contrast, saturation, hue, greyscale, sepia, invert, blur, pixelate, noise and duotone |
| Mask | Circle, ellipse, rounded rectangle, triangle, diamond, pentagon, hexagon, star, heart, arch, blob, or your own SVG path |
| Other | Corner radius, stroke, background colour and alt text |
Fonts
The font picker offers the built-in fonts, Inter and Noto Sans, and a search over about 150 Google Fonts families. The dashboard serves those fonts itself, so editing a template never contacts Google.
If a font can't be loaded, the editor and the renderer use Noto Sans instead and report the warning font_fallback_used.
Dynamic properties
Canvas templates have no placeholders in the text. Instead, you make individual properties dynamic: select an element, open the Data tab and choose Make … dynamic for each property that your data should set. A headline's text, a photo's address, a QR code's content or a badge's visibility are typical examples.
Each dynamic property has an API key, by default element.property, such as headline.text or hero.src. The element's name is part of the key, so renaming an element changes its default keys. Give a property its own API key if integrations already use it. Keys are letters, digits, - and _, in up to four dotted parts.
| Element | Properties you can make dynamic |
|---|---|
| Every element | visible, opacity, x, y, width, height, rotation |
| Text | text, color, fontSize, fontFamily, fontWeight, align, backgroundColor |
| Rectangle, ellipse, polygon, star, frame | fill, strokeColor, strokeWidth; rectangles and frames also cornerRadius |
| Line | strokeColor, strokeWidth |
| Image | src, fit, focalX, focalY, alt |
| Icon | svg, src, color |
| QR code | content, color, backgroundColor, logo |
| Barcode | content, color, backgroundColor, showText |
| Rating | value, count, color, emptyColor |
| Progress | value, max, color, trackColor |
| Chart | data, labels, values (the first series), series, title, colors |
For each dynamic property you can set a Default, a Field label and Description (shown in Zapier and Make), Required, a Max length with Truncate longer values, a Minimum and Maximum, and Allowed values.
There are no conditions or loops in a canvas template. To show or hide an element per render, make its visible property dynamic. Lists of values go to charts.
The API accepts decides what renders may change: Dynamic properties only (the default), or Any property of a named element for designs that were built before the properties were made dynamic.
Dynamic properties take effect when you publish. GET /v1/templates/{id}/schema lists the dynamic_properties of the live version.
Sample data
The Data tab also holds the template's sample data. Generate from dynamic properties fills it with every key and its default; edit the values to see the design with realistic data. The database button in the toolbar, Show the sample data on the canvas, puts the sample data on the canvas; switch it off again to edit.
Copy JSON example copies a data object with every key, and Copy Zapier/Make field list the input fields for those tools.
Render with your data
Send the dynamic properties in data, with POST /v1/images/from-template for an image:
curl https://api-eu.dynamicdocumentapi.com/v1/images/from-template \
-H "Authorization: Bearer $DYNAMIC_DOCUMENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C",
"data": {
"headline.text": "Spring sale: 30 % off everything",
"hero.src": "https://example.com/spring.jpg",
"qr.content": "https://example.com/sale",
"badge.visible": false
},
"format": "png"
}'- Data shapes. Keys can be flat, as above, or nested per element:
"headline": { "text": "…" }. Anullvalue counts as not sent, so the property keeps its default. - Format.
POST /v1/images/from-templaterenders PNG when the request names noformat, whatever the template's default format is.POST /v1/renderswithoutoutput.formatuses the template's default. For a PDF, callPOST /v1/pdf/from-template. - Values are converted where that is unambiguous. Booleans accept
true,1,yesandon(and their opposites), numbers can be strings, colours can be hex,rgb()or CSS names, and lists can be JSON arrays or comma-separated text. Image addresses must behttps://,http://ordata:URLs. - Problems with single values don't fail the render. An unknown key, a key that isn't dynamic, or a value that can't be used is reported as the warning
data_coerced, and the property keeps its designed value. A missing required property, ordatathat isn't an object, fails withdata_invalid. To reject any mismatch before rendering, turn on Validate data against the schema in the template's settings; such requests then fail with422 data_schema_mismatch. - Test keys render with a
TESTwatermark and cost nothing.
Renders use the template's live version. Signed links render a canvas template from a URL without an API key, for images in web pages and emails. More on image output in Image options.
Preview, save and publish
The editor saves your draft 1.5 seconds after each change. If someone else saved the template in the meantime, it asks whether to keep your version or take theirs.
The Preview tab has two previews:
- Instant preview: drawn in the browser with the active sample data, updated as you edit, at 0.5×, 1× or 2×, with the warnings the render would report.
- Server render (⌘↵): a render by our servers with the sample data. It's free and carries a
PREVIEWwatermark. Compare side by side shows both, with the share of pixels that differ.
The toolbar's Export downloads PNG, JPEG or WebP straight from the browser, without a watermark. Download PDF uses the server preview, watermark included.
Publish turns the draft into a new, immutable version that renders use from then on. A design with problems, which the bottom bar lists, can't be published. Under Versions you can make an older version live again or copy it into the draft; Revert draft to live version discards the draft's changes.
Warnings
The inspector shows Rendering warnings for the selected element, and the Layers panel marks elements that have any. The same warnings come back in a render's warnings:
| Code | Meaning |
|---|---|
text_overflow | Text was cut off, shortened or overflows its box |
font_fallback_used | A font couldn't be loaded, so Noto Sans was used |
data_coerced | A data value was converted, shortened or ignored |
asset_failed | An image or other file couldn't be loaded and is missing |
feature_unavailable | A setting can't take effect and was ignored |
See Errors and warnings for every code.
Keyboard shortcuts
Keyboard shortcuts in More actions lists them in the editor. On Windows and Linux, use Ctrl for ⌘ and Alt for ⌥.
| Keys | Action |
|---|---|
| V, H, T, R, O, L, I, F | Select, Hand, Text, Rectangle, Ellipse, Line, Image and Frame tools |
| ⌘Z, ⌘⇧Z | Undo, redo |
| ⌘G, ⌘⇧G | Group, ungroup |
| ⌘⌥G | Put the selection in a frame |
| ⇧A | Put the selection in an auto-layout frame |
| ⌘D, ⌥ + drag | Duplicate |
| Arrow keys | Move by 1 px, with ⇧ by 10 px; with nothing selected, move the view |
| ⌘] and ⌘[ | Bring forward, send backward |
| ⌘⇧] and ⌘⇧[ | Bring to front, send to back |
| Space + drag | Move the view |
| ⌘0, ⌘1, ⌘2 | Zoom to 100 %, to fit, to the selection |
| ⌘+ and ⌘− | Zoom in, zoom out |
| ⌘C, ⌘X, ⌘V | Copy, cut, paste, also between templates |
| ⌘A | Select all |
| Enter, Esc | Enter a group or edit the text; deselect or leave the group |
| Tab, ⇧Tab | Select the next or previous layer |
| ⌘S, ⌘↵, ⌘J | Save now, server preview, API panel |
With the mouse: ⌘-click selects inside groups, ⇧ while dragging keeps to one axis, ⇧ while rotating snaps to 15°, and ⌥ while resizing scales from the centre.
Limits
| Limit | Value |
|---|---|
| Artboard | 1 to 8000 px per side |
| Scale | 1 to 3 |
| Output size | PNG and PDF: up to 16,384 px per side and 268 million pixels, else scene_invalid. JPEG and WebP: up to 16,384 px per side (WebP 16,383) and 100 million pixels, else output_too_large |
| Elements | 2,000 per template, nested up to 32 levels |
| Template content | 5 MB |
| Sample data | 1 MB per dataset |
| Image uploads | 10 MB |
| Image URLs | 8,192 characters; data: URLs up to 10 MB |
| Undo | 200 steps |
An 8000 px artboard at scale 3 is 24,000 px wide and too large; lower the scale or the artboard.
Related pages
- Image options for formats, sizes and image renders in general
- Renders for the render object, versions and delivery
- Signed links to serve canvas images from a URL
- Errors and warnings for
scene_invalid,data_invalidand the warnings
Image and screenshot options
Render PNG, JPEG and WebP images from templates, HTML or URLs, with viewport, scale, cropping, transparency and quality settings.
Template language
Jinja syntax, autoescaping, built-in filters and every custom filter for money, dates, QR codes, barcodes, charts and layout, with sandbox limits.