Polotno + Gelato pairs Polotno's embedded design editor SDK with Gelato's order API and its network of 250+ production partners in 32 countries. Your users design inside your app, your backend submits the order to Gelato, and the product prints close to the customer: lower shipping cost, shorter delivery, smaller footprint.
Try it below. Design the poster, then open the Gelato tab, pick where the buyer lives and press Send to Gelato: the editor exports a print PDF with bleed, and Gelato's API quotes it for buyers in six countries and shows which country would print each one. The order is created as a draft, which Gelato never prints or charges.
The full code, editor and server, is on GitHub: polotno-gelato-demo. It runs on Polotno SDK, so it needs a Polotno API key. To compare it with the other print APIs, see the print on demand API comparison.
The problem Gelato doesn't solve
Gelato's pitch is production logistics: route every order to a print partner near the buyer instead of shipping products across oceans. The API is built around that: you hand it a product UID, a shipping address, and a print-ready file, and Gelato handles the rest.
The part before the file exists is yours. Gelato's own design tooling serves merchants working inside Gelato's dashboard and store integrations; API customers building their own product bring their own artwork. Which leaves the usual four weak setups:
- A bare file-upload field, with print-spec violations discovered after the order fails
- A homegrown editor project that starts as "just cropping and text" and never stops growing
- Rigid server-side compositing that can't offer real personalization
- Sending users to an external tool and losing the order at the context switch
Polotno goes in front of the Gelato API so users design in your product and your backend always submits a file that matches the spec: dimensions, bleed, resolution.
How to send orders with the Gelato API
- Design: User opens a template in the embedded Polotno editor, canvas sized to the Gelato product's print dimensions, bleed included.
- Edit: User personalizes text, images, and layout within your constraints.
- Export: Your app exports a print-ready PDF (with bleed) or a print-resolution PNG, and hosts it at a URL Gelato can fetch.
- Order: Your backend creates the order on Gelato's order API, referencing the product UID, quantity, shipping address, and the file URL.
- Fulfill: Gelato routes the job to the nearest suitable production partner, prints, and ships. Status updates flow back over webhooks.
Polotno owns creation. Gelato owns routing, production, and logistics. Your backend is the orchestration layer between them.
What a request looks like
// 1. Export the print file. Gelato asks for PDF/X-1a:2003 or PDF/X-4,
// so export server-side with @polotno/pdf-export:
import { jsonToPDF } from "@polotno/pdf-export"
await jsonToPDF(store.toJSON(), "./print.pdf", {
pdfx: "x-4",
outputIntent: { profile, identifier: "FOGRA39" },
})
const fileUrl = await uploadToYourStorage("./print.pdf")
// 2. Backend: create the order on Gelato.
await fetch("https://order.gelatoapis.com/v4/orders", {
method: "POST",
headers: {
"X-API-KEY": GELATO_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
orderType: "order",
orderReferenceId: "order-1234",
customerReferenceId: customer.id,
currency: "EUR",
items: [
{
itemReferenceId: "item-1",
productUid: GELATO_PRODUCT_UID,
quantity: 1,
files: [{ type: "default", url: fileUrl }],
},
],
shippingAddress: {
firstName: customer.firstName,
lastName: customer.lastName,
addressLine1: shipping.address1,
city: shipping.city,
postCode: shipping.zip,
country: shipping.country,
email: customer.email,
},
}),
})
// 3. Gelato routes to the nearest production hub, prints, ships,
// and posts status updates to your webhook.What Polotno handles vs. what Gelato handles
Polotno (in your app)
- Embedded editor UI with templates and editable regions
- Canvases sized to Gelato product specs, bleed included
- Brand locking, layout rules, typography
- Print-ready PDF export, or PDF/X-1a and PDF/X-4 CMYK in the browser or on the server
- Variable data and batch generation from the same templates
Gelato (backend)
- 250+ production partners in 32 countries, printing near the buyer
- Product catalog: cards, posters, apparel, mugs, calendars, photo books, packaging
- Order routing, printing, and local shipping
- Status webhooks
Technical details
- Export format: PDF/X-1a or PDF/X-4, the PDFs Gelato asks for, via the @polotno/pdf-export package; PNG for products that take raster files.
- Local production: The same design JSON exports once and prints anywhere. Gelato's routing needs no changes on the creative side.
- Variable data: Drive templates from order data to generate personalized products in batch. See dynamic template variables.
- Multi-page products: Cards and calendars preserve page order on export.
- Handoff to Gelato: POST the order payload (productUid, files, shippingAddress) to the order API, then listen for webhooks.
What you can build
Any Gelato product that accepts a print file:
- Cards and stationery: greeting cards, invitations, postcards
- Wall art: posters, framed posters, canvases, acrylic
- Apparel: tees, hoodies, tote bags
- Photo products: calendars, photo books, mugs
- Business print: flyers, brochures, business cards
FAQ
Do I need a Gelato account?
Yes. Gelato handles production and logistics; you configure products and pricing on their side and bring your own storefront.
What file format does Gelato expect?
Depends on the product: print-ready PDF for most paper products, high-resolution raster for others. Polotno exports both from the same design JSON.
Does local production change anything in the design layer?
No. That's the appeal. One export pipeline; Gelato decides where it prints.
Can I generate personalized products in bulk?
Yes. Template JSON plus a data source renders any number of variants. See Polotno's VDP docs.
Is this self-serve yet?
Yes. Try the demo above, then start from its code with a Polotno API key and your own Gelato account.
Start building
The code for the demo above is on GitHub: polotno-gelato-demo. Clone it, add a Polotno API key (a trial key from your Polotno dashboard works) and your Gelato API key, and the editor-to-order flow runs locally.
