Export Formats

Design on Web supports 8 export formats covering raster, vector, layered, and data formats. Built-in formats work out of the box, while advanced formats require registering export plugins.

Format Overview

FormatTypeDescriptionPlugin Required
pngRasterLossless with transparency supportNo (built-in)
jpegRasterLossy compression with quality sliderNo (built-in)
webpRasterModern format with superior compressionNo (built-in)
svgVectorScalable vector with enhanced metadata@design-on-web/export-svg
pdfVectorPDF document via jsPDF + svg2pdf.js@design-on-web/export-pdf
psdLayeredPhotoshop file with editable layers@design-on-web/export-psd
tiffRasterPrint-standard high quality raster@design-on-web/export-image
jsonDataSerialized design data for save/loadNo (built-in)

Built-in Exports

PNG, JPEG, WebP, and JSON exports work without any plugins.

Built-in export formatstypescript
// Export as PNG (built-in)
const pngBlob = await engine.export('png', {
  quality: 1,        // 0-1, default 1
  multiplier: 2,     // resolution multiplier, default 1
});

// Export as JPEG
const jpegBlob = await engine.export('jpeg', {
  quality: 0.85,     // 0-1, controls compression
  multiplier: 1,
});

// Export as WebP
const webpBlob = await engine.export('webp', {
  quality: 0.9,
  multiplier: 2,
});

// Export as JSON (save/load designs)
const jsonString = engine.exportJSON();

// Load from JSON
await engine.loadJSON(jsonString);

Plugin Exports

SVG, PDF, PSD, and TIFF require installing and registering export plugins. Install them from npm and register before use.

Plugin-based exportstypescript
import { SvgExportPlugin } from '@design-on-web/export-svg';
import { PdfExportPlugin } from '@design-on-web/export-pdf';
import { PsdExportPlugin } from '@design-on-web/export-psd';
import { ImageExportPlugin } from '@design-on-web/export-image';

// Register export plugins
await engine.registerPlugin(SvgExportPlugin);
await engine.registerPlugin(PdfExportPlugin);
await engine.registerPlugin(PsdExportPlugin);
await engine.registerPlugin(ImageExportPlugin);

// Now these formats are available:

// SVG — vector export with enhanced metadata
const svgBlob = await engine.export('svg');

// PDF — via jsPDF + svg2pdf.js
const pdfBlob = await engine.export('pdf');

// PSD — layered Photoshop file with editable layers
const psdBlob = await engine.export('psd');

// TIFF — print-quality raster format
const tiffBlob = await engine.export('tiff', {
  quality: 1,
  multiplier: 3,  // high-res for print
});
ℹ️
Plugin installation
Export plugins are separate npm packages to keep the core bundle small. Only install the formats you need.

Export Options

Common Export Options

NameTypeDefaultDescription
qualitynumber1Output quality from 0 to 1 (JPEG, WebP, TIFF)
multipliernumber1Resolution multiplier (2 = 2x resolution)
allPagesbooleanfalseExport all pages (PDF only)
pageIndexnumberExport a specific page by index

Download Helper

Triggering a downloadtypescript
// Helper: trigger browser download
function downloadBlob(blob, filename) {
  const url = URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.href = url;
  a.download = filename;
  a.click();
  URL.revokeObjectURL(url);
}

// Export and download
const blob = await engine.export('png', { multiplier: 2 });
downloadBlob(blob, 'my-design.png');

Multi-page Export

PDF export supports multi-page documents. Raster formats export a single page at a time.

Multi-page exporttypescript
// Export all pages as PDF
const pdfBlob = await engine.export('pdf', {
  allPages: true,    // include all pages
});

// Export specific page
const pageBlob = await engine.export('png', {
  pageIndex: 2,      // export page 3 only
  multiplier: 2,
});
💡
Print-ready exports
For print-quality output, use multiplier: 3 or higher with TIFF or PNG format. This produces a 300 DPI output for standard 1080px canvas designs.

UI: Export Dialog

The export dialog is accessible via the Export button in the toolbar. It provides:

  • Format selector with all registered formats
  • Quality slider (for JPEG, WebP, TIFF)
  • Resolution multiplier (1x, 2x, 3x, 4x)
  • Transparent background toggle (PNG, WebP)
  • Page selection for multi-page designs
  • Live preview of the exported output
  • Download button