huiya07

Print To Paper — Development skill for Claude Code

Development community

Claude Code 打印 skill: 双引擎 PDF 打印(.NET光栅/Sumatra矢量)、横线纸生成、Spooler/队列/PnP 三层诊断、屏幕vs纸面断线定层 — 全链路真机实测.

How to install Print To Paper

This entry records only its repository, not the path inside it, so there is no exact command to give. Open huiya07/print-to-paper and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Print To Paper does

Claude Code 打印 skill: 双引擎 PDF 打印(.NET光栅/Sumatra矢量)、横线纸生成、Spooler/队列/PnP 三层诊断、屏幕vs纸面断线定层 — 全链路真机实测.

Alternatives in Development

  • Book To Skill — Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work 25.9k ★
  • Mono Color Skill — One-ink editorial print image skill — warm paper, halftone photography, active negative space, and restrained 3k ★
  • Output Folder — Print the path to the ContentForge output folder and open it 31 ★

README

print-to-paper

Claude Code (Agent) 打印 skill — 把"打印"这件事交给 agent: 任意 PDF 双引擎打印、横线纸生成、Spooler/队列/PnP 三层诊断、屏幕断线 vs 纸面断线定层。全链路真机实测沉淀 (Windows 11 + Brother DCP-7057 激光打印机, 2026-10)。

A Claude Code printing skill: dual-engine PDF printing, ruled-paper generation, 3-layer print diagnosis (Spooler / queue / PnP), and screen-vs-paper line-break triage. All paths verified on real hardware.

为什么 / Why

GitHub 上的 agent 打印 skill 几乎是空白 (2026-10-05 检索: 最大办公 skill 集合 [claude-office-skills/skills](https://github.com/claude-office-skills/skills) 的 137 个 SKILL.md 中 0 个与打印相关, 全网仓库关键词+语义检索亦未见同类; 2026-10-06 复核仍为 0)。而打印链路的坑极多 — 本 skill 的 8 条踩坑档案每条都是真实排障记录:

  • Start-Process 的 ArgumentList 不给含空格参数加引号 → 打印机名被拆, 报"该打印机不存在"
  • Edge headless --print-to-printer 在用户开着浏览器时静默吞参数
  • pwsh7 里程序集叫 System.Drawing.Common, System.Drawing.Printing 不是程序集名
  • 黑白激光打印 DC 是 1bpp, 不吃 24bpp 位图 (位图打印必须走 .NET GDI+)
  • pymupdf 不能存 BMP; GUI 进程 $LASTEXITCODE 为 null 会误判失败
  • 屏幕上"断线"多半是阅读器渲染抖动, 先光栅化定层再改参数

功能 / Features

能力 入口
任意 PDF 打印 (.NET 光栅引擎, 默认) scripts/print_pdf.ps1 -Pdf file.pdf
任意 PDF 矢量打印 (SumatraPDF 引擎) scripts/print_pdf.ps1 -Pdf file.pdf -Engine Sumatra
横线纸生成 (行距/灰度/线宽参数化) scripts/ruled_paper.py
横线直画 (GDI, 跳过 PDF 最短路径) scripts/print_lines_gdi.py
断线定层 (光栅化扫描) scripts/check_lines.py --pdf x.pdf
三层诊断 + 8 条踩坑档案 SKILL.md

安装 / Install

git clone https://github.com/huiya07/print-to-paper.git ~/.claude/skills/print-to-paper

依赖: Python 3 (`pip install reportlab pymupdf pywin32`) · PowerShell 7+ · 可选 [SumatraPDF](https://www.sumatrapdfreader.org) (矢量引擎) · 打印机驱动正常 (Spooler 运行中)。

默认取系统默认打印机; 用 `--printer` / `-Printer` 指定其他打印机 (实测环境为 Brother DCP-7057)。

快速开始 / Quick start

# 打印任意 PDF (默认 .NET 引擎, 先 dry-run 验参数)
pwsh -File ~/.claude/skills/print-to-paper/scripts/print_pdf.ps1 -Pdf doc.pdf -DryRun
pwsh -File ~/.claude/skills/print-to-paper/scripts/print_pdf.ps1 -Pdf doc.pdf

# 矢量质量
pw