Skip to content
Projets

0ldFive/Vue-Print-Designer

Voir sur GitHub

À propos

Vue Print Designer is a visual print designer for business forms, labels, receipts, courier slips, and other scenarios. It supports templating and variables, provides silent printing and cloud printing capabilities, and is compatible with multiple export and printing methods.

Développement web et applicatif

Comment ces chiffres sont mesurés

What you can do

  • Visual Design - Smart Pagination - Cross-Framework
  • Drag-and-drop layout with rulers, grids and alignment for text, images, tables, barcodes, QR codes and shapes — no more eyeballing element positions. - Handles long table pagination automatically with header/footer repetition — no complex manual logic, WYSIWYG. - Web Components based, zero-dependency with Vue / React / Angular / native HTML, and supports Vue 2.
  • Enterprise Ready - Print & Labels - i18n

Progression mesurée des étoiles

in 24h
+1
in 7 days
+3
in 15 days
+6
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Vue Print Designer

Web Print Control

Visual Print Designer  ·  Labels / Receipts / Forms — All Covered
Templating and variables  ·  Silent print and cloud print in one  ·  Zero-dependency integration for any stack

Gitee stars Gitee forks GitHub stars GitHub forks
NPM Downloads NPM Version License QQ Group

Live Demo  ·  Docs  ·  Client Download  ·  Integration Example

简体中文  ·  English  ·  繁體中文  ·  日本語  ·  한국어  ·  Deutsch

Vue Print Designer main view

Designer main view  ·  canvas / property panel / layer panel

First-load −65% ES Bundle 300 KB Render 80 ms Languages 6 Command Sets 4
6 heavy third-party packages removed, lighter first load Built as Web Components, lower integration cost In-house rendering engine, about 73% faster per page Auto-detected from the browser, or set via API Supports TSPL / ZPL / ESC-POS / CPCL

Drag & drop  →  bind variables  →  preview  →  browser / client / label printer output


Core Features

AI Assistant · generate and edit templates in natural language
A built-in natural-language chat panel that generates invoice, delivery note, and waybill templates from a description, with multi-turn edits and image reference input; results appear as a change preview before you apply them to the canvas in one click. Works with OpenAI-compatible endpoints, including self-hosted or third-party model services, with multi-model profiles and advanced sampling parameters.

Visual Design Smart Pagination Cross-Framework
Drag-and-drop layout with rulers, grids and alignment for text, images, tables, barcodes, QR codes and shapes — no more eyeballing element positions. Handles long table pagination automatically with header/footer repetition — no complex manual logic, WYSIWYG. Web Components based, zero-dependency with Vue / React / Angular / native HTML, and supports Vue 2.
Enterprise Ready Print & Labels i18n
Custom paper sizes, API data integration, template import/export, and printer / copies / duplex / DPI controls. Browser print, PDF / image export, silent / cloud print, plus native label commands sent as RAW through the system print queue, keeping barcodes and QR codes vector-sharp. Simplified / Traditional Chinese, English, Japanese, Korean and German — auto-detected from the browser or set via API.

UI Preview

AI assistant panel Template market
AI assistant · template generation in natural language Template market
AI model configuration Shortcut reference Print preview Vue Print Designer QQ Group QR Code (1038069636)
AI assistant · model endpoint setup Shortcut reference Print preview Community · QQ Group 1038069636

Print & Export

Browser Print Export Silent / Cloud Print Label RAW Output
Native preview and print, with printer / copies / duplex / DPI controls Generate PDF, images (merge / split), HTML and Blob with custom filenames Silent print without dialogs, cloud print with remote task dispatch, run by the local client Templates to native commands, sent as RAW through the system queue, batch and continuous paper

Companion Print Client (PrintDot Client)

PrintDot Client is the companion desktop app for this project. It connects to your local printers and handles silent print jobs, so you can print straight from the browser without any pop-up dialogs. It provides service control, connection settings, print history, update notifications, and print preview to help you complete the local print workflow.

  • Platforms: Windows / macOS / Linux
  • Key capabilities: Automatic device discovery, stable connection & forwarding queue, lightweight background mode, print job history and update notifications
  • Download: https://printdot.cc/en/client
PrintDot main view PrintDot settings PrintDot update notification PrintDot job history PrintDot print preview
Main view · service control and available printers Settings · cloud relay and connection config Update notification · check for latest client Job history · task status and retry Print preview · real-time preview in local client

Label Printing (Native RAW Commands)

Thermal and thermal-transfer label printers (TSC, Gprinter, Zebra, HPRT, Deli, Xprinter and others) are command-driven: a PDF can only be rasterized page by page, meaning slower output, lower barcode scan rates and misalignment on custom paper. The client adds a dedicated label path that parses the template JSON, generates native commands, and writes them as RAW to the system print queue.

Four command languages Faithful element rendering Controllable print options Batch and multi-page Print history
TSPL / ZPL / ESC-POS / CPCL, inferred from printer and driver names by default, or set explicitly when detection fails. Text, barcodes, QR codes, tables (merged cells, headers / footers), images (dithered black and white), shapes and rotation. Label width and height (height 0 for continuous paper), DPI, speed, density, gap / black mark / offset, bitmaps or built-in fonts. One page per label; labels[] submits a whole batch with per-record copy counts and an optional interval. Every label job is recorded in the client history with printer, copies, status and time, and failed jobs can be retried.

Two entry points

  • Send a print_label message and forward the template JSON exported by the designer as-is, with no extra processing;
  • Tick "Label printing" in the client's print preview window to print locally (the designer's preview mode must be JSON). When a label printer is selected, the command language is detected and enabled automatically, and the result can always be overridden.

Rendering Consistency Comparison

The images below show the same 60 × 40 mm warehouse label in three forms: the original output exported from the designer, the firmware simulation produced by Zebra's official Labelary service from the ZPL commands, and the client's local redraw of the same commands. The bottom-right pane overlays all three in red, yellow and blue, so overlapping areas appear deep purple-grey and positions, font sizes and barcode modules can be checked for alignment.

Label printing three-way comparison

Four panes: designer output / vendor API simulation / client command rendering / three-way overlay

Designer output Vendor API simulation Client command rendering Three-way overlay
Designer output Vendor API simulation Client command rendering Three-way overlay (diff)

Note: Label paper prints in black and white only, so colour images are converted automatically. Page numbers, watermarks, gradients and shadows are not printed on labels. ESC/POS printers need to support page mode. Text layout stays consistent across computers, with a position error of no more than 0.06 mm at 203 dpi.


Integration Example

A complete integration example based on Vue 3 + Element Plus, demonstrating how to embed the print designer into a real-world business application.

Parameter debugging Designer Dark mode
Parameter Debugging Designer Dark Mode

Quick Start

Option A: npm Package (Web Components) Learn Web Components

Works with any stack (Vue / React / Angular / Vanilla). Web Components supports Vue 2 as a custom element — no Vue 2 component adapter required. Parameters, CRUD, and JSON examples: Web Components API Guide.

npm i vue-print-designer
# or
pnpm add vue-print-designer
# or
yarn add vue-print-designer
Expand: Vue 3 / Vite integration example (import · init · print / export · events)

1) Use in Vue 3 / Vite

// main.ts
import "vue-print-designer";
import "vue-print-designer/style.css";
<template>
  <print-designer id="designer"></print-designer>
</template>

2) Separate init from usage (Vue 3 Options API)

Designer page (init and editing):

<script lang="ts">
export default {
  mounted() {
    const el = this.$refs.designerRef as any;
    el.setBranding({ title: "Business Print Designer", showLogo: true });
    el.setTheme("light");
    el.loadTemplateData(/* data from your API */);
    el.setVariables({ orderNo: "A001" }, { merge: true });
  },
};
</script>

<template>
  <print-designer ref="designerRef"></print-designer>
</template>

Business pages (print / export anywhere):

const el = document.querySelector("print-designer") as any;

// Print
await el.print({ mode: "browser" });

// Export PDF / image / HTML / Blob
await el.export({ type: "pdf", filename: "order-20240223.pdf" });
await el.export({ type: "html", filename: "order-20240223.html" });
const pdfBlob = await el.export({ type: "pdfBlob" });

3) Event listeners

el.addEventListener("ready", () => {});
el.addEventListener("printed", (e) => {});
el.addEventListener("exported", (e) => {
  const blob = e.detail?.blob;
});
el.addEventListener("error", (e) => {
  console.error(e.detail?.scope, e.detail?.error);
});

Option B: Build from Source and Integrate Your API

Best for teams with deep customization requirements. Requirements:

  • Node.js >= 16.0.0
  • npm >= 7.0.0 or yarn / pnpm

Recommended integration points:

  • Template CRUD: useTemplateStore (replace with your API)
  • Custom elements CRUD: customElements in useDesignerStore
  • Variables and template data: instance methods setVariables / loadTemplateData

Custom element extension guide: custom-element.md.

i18n

Built-in support for 6 languages, automatically detected from the browser language by default and also configurable via API:

Simplified Chinese zh Traditional Chinese zh-Hant English en Japanese ja Korean ko German de


License

AGPL-3.0-only

Please follow TRADEMARKS.md for brand and logo usage. For removing or replacing branding, see COMMERCIAL_LICENSE.md.

Explorer des projets similaires

Chargement…