Sign inSign up

[Open Source] An open-source, zero-backend-dependent Web print template visual designer that can be AI-driven

Open SourceReports & Dashboards
2026-12-03 12:57 0 views • 0 downloads 0KB
[Open Source] An open-source, zero-backend-dependent Web print template visual designer that can be AI-driven

1. Project Overview

Image

OpenPrint

Open-source Web printing designer · AI-driven · Cross-platform

OpenPrintIt is an open-source, zero-backend-dependent Web printing template visual designer. It allows users to design express delivery labels, invoices, labels, and reports through drag-and-drop, supports AI one-sentence generation, cloud printing, C++ desktop client silent printing, and ERP system connection in 3 minutes.

Image

Real-time preview of printing template designer, drag-and-drop controls

2. Open Source License

Licensed under AGPL-3.0

3. Screenshots

Key Highlights

AI one-sentence generation template

Say goodbye to manual drag-and-drop, directly describe the requirements to generate professional printing templates. Supports express delivery labels, logistics labels, warehouse documents, and retail receipts for multiple scenarios.

Image

AI natural language generation of printing templates, one sentence completes the design of express delivery labels

User input:"Help me generate an express delivery label with recipient, sender, and shipping number barcode"AIOutput: Automatically create template → layout text control → add barcode → one-click use

Cloud printing

Cross-regional, multi-store remote printing, unified template management. Browser direct printing, no driver installation. Cloud printing queue, automatic retry on disconnection, permission control, and print log auditing.

Multi-store remote printing, unified template management, and print queue monitoring

Image

Web report design

Supports multiple-level report structures, such as grouped tables, cross-tables, and master-slave tables. Supports summary functions, such as sum, average, and count. Supports embedded bar charts, line charts, and pie charts. Supports conditional formatting and data warning. Supports multiple data sources.

Image

Grouped reports, cross-tables, and charts, meet complex data display requirements

4. Feature Overview

Functional characteristics

Designer

Function

Description

Control library

Text, image, rectangle, circle, line, barcode, QR code, table, rich text, and chart, 10 types of controls

Drag-and-drop design

Real-time preview, free drag-and-drop + snap alignment + ruler assistance

Multi-page support

Multi-page design, each page has independent page headers and footers, and page margins can be adjusted

Data binding

Supports JSON, CSV, and API data sources, and Mustache expression binding

Theme Switching

Dark mode / light mode, one-click switch

Template Management

Local storage, template import / export, and template market

Real-Time Preview

Preview data binding effects, page-by-page preview

Export

PDF, JPG, SVG, HTML, and multiple format exports

Printing and integration

  • Web Direct Print
    — Browser calls system print dialog
  • Desktop Silent Print
    — Companion C++ Qt client, zero pop-up print
  • Cloud printing
    — Remote store print, print queue management
  • ERP Interface
    — HTTP API interface, 3-minute access

5. Tech Stack

Tech Stack

  • Vue 3
  • TypeScipt
  • Fabric.js 7.x
  • Pinia
  • Vite
  • Vitest
  • Naive UI
  • UnoCss

Quick Start

Environment Requirements

  • Node.js >= 22.18.0
  • pnpm >= 9.x

Installation and Setup

# Clone the repositorygit clone https://gitee.com/haiming236/openprint.gitcd open-print# Install dependenciespnpm install# Start the Development Serverpnpm dev# Build production versionpnpm buildPreview Production Buildpnpm preview

I Assistant

OpenPrint built-in AI assistant, supports natural language generation of print templates.

Usage

  1. New Template
    — Input requirement description, AI generates complete template
  2. Modify Current Template
    — Select control, let AI adjust layout or style
  3. Field Binding
    — Automatically identifies data fields and binds to template controls

Technical principle

  • Based on LLM parsing user intent, outputs structured template description
  • Internal specification engine converts description to Fabric.js control configuration
  • Supports context awareness, can incrementally modify existing templates

Supported Scenarios

  • Courier single (SF Express, JD Logistics, postal formats)
  • Logistics labels (waybill number, destination, weight)
  • Warehouse documents (inventory in, inventory out, inventory check)
  • Retail receipts (cash receipt, return and exchange)
  • Invoices (value-added tax invoices, receipts)
  • Custom Reports

Technical Architecture

┌─────────────────────────────────────────────────────────────────┐│                       Browser (Vue3 SPA)                        ││                                                                 ││  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌───────────────┐  ││  │ Control Panel  │  │ Property Panel  │  │ Layer Panel  │  │  Data Source Panel │  ││  └────┬─────┘  └────┬─────┘  └────┬─────┘  └──────┬────────┘  ││       └──────────────┴─────────────┴───────────────┘           ││                           │                                    ││  ┌──────────────────────────────────────────────────────────┐  ││  │                    Fabric.js Canvas                       │  ││  │  Text │ Image │ Barcode │ QR Code │ Table │ Chart │ Rectangle │ Ellipse │  ││  └──────────────────────────────────────────────────────────┘  ││                           │                                    ││  ┌──────────────────────────────────────────────────────────┐  ││  │                    Layout Engine (Layout Engine)               │  ││  │  Data Binding │ Expression Calculation │ Pagination Engine │ Table Engine │ Grouping Engine  │  ││  └──────────────────────────────────────────────────────────┘  ││                           │                                    ││  ┌──────────────────────────────────────────────────────────┐  ││  │                    Renderer (Renderer)                    │  ││  │  HTMLRendering │ PDF Export │ JPG Export │SVGExport │ Header Rendering     │  ││  └──────────────────────────────────────────────────────────┘  │└─────────────────────────────────────────────────────────────────┘                             │                    ┌────────┴────────┐                    ▼                 ▼           ┌──────────────┐  ┌──────────────┐│ C++ Qt Client │  │ Cloud Printing Service    ││ Silent Printing      │  │ Remote Printing      ││ Local Printer      │  │ Queue Management      │           └──────────────┘  └──────────────┘

Core Modules

Module

Path

Description

Designer

src/design/

Canvas Designer, Control System, Panel, Toolbar

Layout Engine

src/core/layout-engine/

Data Binding, Pagination, Table, Grouping, Expression

Rendering Engine

src/core/renderer-html/

HTML Rendering, CSS Generation, Rich Text Rendering

Export Engine

src/core/export-engine/

PDF, JPG, SVG Export

AI Assistant

src/ai/

AI-generated Templates, Context Management

Control library

src/design/canvas/controls/

10 types of Fabric.js controls


Project Structure

open-print/├── src/│   ├── ai/                        AI Assistant (generation/standardization/client)│   ├── core/                      Core Engine│   │   ├── layout-engine/         Layout Engine (data binding/pagination/table/grouping)│   │   ├── renderer-html/         HTML Renderer│   │   ├── export-engine/         Export Engine (PDF/JPG/SVG)│   │   ├── chartkit/              Chart Rendering (bar chart/line chart/pie chart)│   │   ├── fonts/                 Font Loading and Management│   │   ├── headless/              Headless Rendering│   │   ├── spec/                  Template Standardization and Verification│   │   └── sdk/                   SDK Encapsulation│   ├── design/                    Designer Interface│   │   ├── canvas/                Canvas & Control│   │   ├── panels/                Property/Layer/Data Source Panel│   │   ├── preview/               Preview Panel│   │   ├── toolbar/               Top Toolbar│   │   ├── modals/                Modal Dialog (import/export/settings)│   │   └── stores/                # Pinia State Management│   ├── repository/                # Data Warehouse (Local/HTTP/Simulation)│   ├── types/                     # TypeScript Type Definition│   ├── config/                    # Configuration (Print Settings/AI Settings)│   ├── theme/                     # Theme System│   └── utils/                     # Tool Function├── website/                       # Official Website├── dist/                          # Build output├── public/                        # Static Resources└── docs/                          # Documentation

Deployment

Static Deployment

Build product as pure static files, can be deployed to any HTTP server:

pnpm build# Deploy the dist/ directory to Nginx / Apache / Vercel / Netlify and so on

Nginx Configuration Example

server {    listen 80;    server_name your-domain.com;    root /path/to/open-print/dist;    index index.html;    location / {        try_files $uri $uri/ /index.html;    }}

Docker Deployment

FROM nginx:alpineCOPY dist/ /usr/share/nginx/htmlCOPY nginx.conf /etc/nginx/conf.d/default.confEXPOSE 80

Desktop Client

OpenPrint provides aC++ Qt Desktop Print Client, supports:

  • Silent Printing
    — Receive designer templates and send directly to local printers, zero pop-up
  • Batch Printing
    — Supports CSV/JSON data batch rendering and printing
  • Local Printer Management
    — Get printer list, status monitoring
  • HTTP Interface
    — Receive print tasks through REST API
  • Cross-platform
     — Windows / Linux / macOS

 

Image

C++ Qt Desktop Client, Silent Printing, Batch Processing

Tech Stack

  • C++ 17
  • Qt 6.x
  • CMake

ERP Interface

OpenPrint provides standard HTTP API, 3 minutes to complete ERP connection:

Connection Process

  1. Design Template
    — Drag and drop to generate print templates in Web Designer
  2. Export Template File
    — Export .json template file
  3. API Connection
    — ERP system pushes data + template ID through HTTP, triggers printing
Image

Standard HTTP API Connection, 3 minutes to access ERP system

API Example

POST /api/printContent-Type: application/json{  "template_id": "waybill-001",  "data": {    "sender_name": "Zhang San",    "sender_phone": "13800138000",    "receiver_name": "Li Si",    "receiver_address": "Beijing City Chaoyang District..."  },  "printer": "local-printer-01",  "copies": 1}

FAQ

Does OpenPrint need a backend service?

No. OpenPrint is a pure frontend application, zero backend dependencies. Templates are stored in browser local (IndexedDB), AI functions are implemented by directly calling LLM API. If you need to connect to a printer or ERP, you can deploy an optional desktop client.

Which browsers are supported?

Chrome / Edge / Firefox / Safari and other modern browsers. It is recommended to use Chromium kernel browsers for the best experience.

How to customize fonts?

Place font files (.ttf / .woff2) in the public/fonts/ directory and register in src/core/fonts/catalog.ts can.

Does it support batch printing?

Yes. Through CSV/JSON data source + template engine, you can batch generate multi-page documents and export or print. The desktop client supports batch silent printing.

How to export templates and share with others?

Use template export function to export .json file, others can load and use through import function. Also supports URL encoded sharing (zero backend).

Development Commands

# Run Testpnpm vitest# Type Checkingpnpm type-check# Format Codepnpm formatCode Coveragepnpm vitest --coverage

6. Source Code Repository

Open-source project address:

https://gitee.com/haiming236/openprint

#1
资源直链https://gitee.com/haiming236/openprint.git
Download

Next steps

Browse similar deployable resources