# XiHan.PrintDesigner **Repository Path**: XiHanFun/XiHan.PrintDesigner ## Basic Information - **Project Name**: XiHan.PrintDesigner - **Description**: 快速、轻量、高效、用心的框架无关打印设计器。曦寒懿(XiHanFun)开源生态的一部分。 - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: main - **Homepage**: https://print.docs.xihanfun.com - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 3 - **Created**: 2026-10-18 - **Last Updated**: 2026-11-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: Designer, Print, Web-components, xihan ## README

XiHan.PrintDesigner

A fast, lightweight, efficient and thoughtfully built framework-agnostic print designer

CI npm MIT License GitHub Stars Gitee Stars GitCode Stars

Docs · Getting Started · Changelog

English | 简体中文

XiHan.PrintDesigner is a framework-agnostic print designer delivered as Web Components. It designs print templates visually, previews and prints in the browser, and prints silently with a local client. It is part of the XiHanFun open-source ecosystem. ## Features | Feature | Description | | --- | --- | | Framework-agnostic | Native Web Components for Vue, React, Angular and pages without a framework | | No third-party dependencies | Nothing third-party at runtime | | Templates are data | Templates are JSON that neither contain nor execute code | | Data stays with you | Components make no network requests; data, storage and permissions go through callbacks | | [Print client](https://print.docs.xihanfun.com/guide/client) | Silent printing, printer selection, raw command printing and PDF export | ## Getting Started ```bash pnpm add @xihan-print/core @xihan-print/runtime @xihan-ui/styles ``` ```ts import { definePrintPreview } from '@xihan-print/runtime' import '@xihan-ui/styles/index.css' import '@xihan-print/runtime/style.css' definePrintPreview() const preview = document.createElement('xh-print-preview') preview.schema = schema preview.data = data document.body.append(preview) ``` Templates and data binding are covered in the [quickstart](https://print.docs.xihanfun.com/quickstart). ## Packages | Package | Description | | --- | --- | | `@xihan-print/core` | Model layer: template schema, validation and editing commands, with no DOM dependency | | `@xihan-print/runtime` | Runtime: template preview, browser printing and client connection | | `@xihan-print/designer` | Designer: visual template design | Dependencies run `designer → runtime → core`, and business pages only need `runtime`. ## Print Client `client/` is a Windows tray application that listens only on 127.0.0.1, asks the user to authorize each site on first connection, and renders print jobs in an isolated sandbox. See the [print client](https://print.docs.xihanfun.com/guide/client) guide. ## Local Development Requires Node.js 24+ and pnpm 11+. The development preview runs at `http://localhost:5191`. ```bash cd print pnpm install pnpm dev ``` ## Ecosystem | Project | Description | | --- | --- | | [XiHan.Framework](https://github.com/XiHanFun/XiHan.Framework) | .NET microkernel development framework | | [XiHan.UI](https://github.com/XiHanFun/XiHan.UI) | Framework-agnostic headless UI component library | | [XiHan.BasicApp](https://github.com/XiHanFun/XiHan.BasicApp) | A beautifully crafted general-purpose admin kernel built on XiHan.Framework and XiHan.UI | | [XiHan.FlowDesigner](https://github.com/XiHanFun/XiHan.FlowDesigner) | Framework-agnostic flow designer | | [XiHan.FormDesigner](https://github.com/XiHanFun/XiHan.FormDesigner) | Framework-agnostic form designer | | [XiHan.ReportDesigner](https://github.com/XiHanFun/XiHan.ReportDesigner) | Framework-agnostic report designer | ## Documentation The documentation site is written in Chinese. [Runtime](https://print.docs.xihanfun.com/guide/runtime) · [Designer](https://print.docs.xihanfun.com/guide/designer) · [Print client](https://print.docs.xihanfun.com/guide/client) · [Changelog](https://print.docs.xihanfun.com/changelog) ## Contributing [Issues](https://github.com/XiHanFun/XiHan.PrintDesigner/issues) and pull requests are welcome. Commits follow Conventional Commits, and changes must pass the CI gates. Community: QQ group [462371834](https://qm.qq.com/q/qYp1Urv3z2). Support the project: [sponsorship page](https://docs.xihanfun.com/cosmos/sponsor). ## License [MIT](./LICENSE) © 2021-Present XiHanFun and contributors. The XiHan.PrintDesigner name, interface design and original visual expression belong to the author.