Import and Export

Polotno offers a comprehensive suite of tools for importing and exporting designs, catering to a wide range of needs from simple JSON file handling to high-quality image and video exports. This documentation outlines the various import and export capabilities of Polotno, providing detailed descriptions and use cases for each format.

Use Cases

  1. JSON Import and Export: Save and load design states, share templates, or integrate with other systems that utilize JSON.

  2. Image Exports (PNG, JPEG): Create high-quality images for digital use, social media, or printing.

  3. PDF Export: Produce high-quality prints, particularly useful for marketing materials, books and documentation.

  4. HTML and SVG Export: Embed designs into websites, though these formats are still experimental.

  5. GIF Export: Create animated designs for web use.

  6. MP4 Video Export: Essential for creating video content for digital marketing and social media.

Importing Designs

Polotno allows you to import a design from a JSON file. This functionality is ideal for loading saved design states or templates into the Polotno editor. Whether you're resuming a previous project or sharing templates with team members, importing JSON files ensures a seamless workflow.
The JSON must follow the Polotno's store structure.

Polotno doesn't support importing of other formats like PDF, PPT, PSD. But you can write your own tools to convert other formats into Polotno's JSON. If you plan to do that, please contact us to collaboration on that.

Exporting Designs

For detailed export options of every type, take a look into store documentation.

JSON Export

Polotno can export the current design as a JSON file. This feature is useful for saving your work, sharing templates with others, or integrating with other systems. JSON exports capture the entire design state, making it easy to reload and edit designs later.

store.toJSON()

PNG and JPEG Export

Polotno supports exporting designs into PNG and JPEG formats with configurable quality settings. You can perform these exports directly in the browser or on the server, depending on your needs. Whether you're creating high-quality images for digital use, social media, or printing, Polotno offers the flexibility to adjust quality settings to balance between file size and image quality.

await store.saveAsImage();
await store.toDataURL()

PDF Export

You can export designs into PDF files with Polotno. Currently, these PDFs contain raster images (JPEGs) instead of vector graphics. However, they can be exported in very high quality, making them suitable for printing purposes. Both client-side and server-side export options are available, providing flexibility for different workflows.

store.saveAsPDF();

HTML and SVG Export

Polotno supports exporting designs into HTML and SVG formats. These formats are still experimental and may not fully support all features or produce consistent results. Both client-side and server-side export options are available. HTML and SVG exports are useful for embedding designs into websites, though you might encounter some inconsistencies due to their experimental nature.

store.saveAsHTML();
store.saveAsSVG();

GIF Export

Polotno can export designs into GIF format, suitable for creating animated designs for web use, such as banners, ads, and social media posts. Both client-side and server-side export options are available, ensuring flexibility for different needs.

store.saveAsGIF();

MP4 Video Export

Polotno can export designs into MP4 video format. This functionality is only available via the Cloud Render API and not on the client side. This export option is essential for creating video content for digital marketing, social media, and other applications where video format is crucial.

News, updates and promos – be the first to get 'em

News, updates and promos – be the first to get 'em