windows-print-image
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "windows-print-image" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-98cb13a6480362be8bc1a79f796f263499aaaabb0e3514bea7bc229d40748ee0. Verify the upstream source and version against https://skillhub.cn/skills/user_6da1df82/windows-print-image before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Print images on Windows by invoking mspaint /pt from Python, addressing bash-related Chinese path encoding issues.
Introduction source: third_party · user_6da1df82 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Print an image file to a specified printer on Windows. Uses Python `subprocess` + `mspaint /pt` to avoid bash/git-bash Chinese path encoding problems.
- Testing
- Not tested
Browse files
Frontmatter
name: windows-print-image
description: Print images on Windows via mspaint /pt using Python — bypasses bash Chinese path encoding issues.
category: productivityWindows Print Image
Print an image file to a specified printer on Windows. Uses Python subprocess + mspaint /pt to avoid bash/git-bash Chinese path encoding problems.
Trigger
- User asks to print an image/file
- User mentions printing something on Windows
Steps
1. Confirm file exists
python -c "import os; print(os.path.exists(r'<absolute_path>'))"
2. List available printers (optional)
powershell -Command "Get-Printer | Select-Object Name, PrinterStatus | Format-Table -AutoSize"
Check default printer:
powershell -Command "(Get-WmiObject -Query 'SELECT * FROM Win32_Printer WHERE Default=True').Name"
3. Print the image
python -c "import subprocess; img = r'<absolute_path>'; prn = '<printer_name>'; subprocess.run(['mspaint', '/pt', img, prn])"
Critical: Use Python raw strings (r'...') for paths — this is what makes it work! Bash's cmd /c mspaint /pt fails with Chinese paths due to encoding corruption, but Python's raw strings preserve the exact bytes.
Example
python -c "import subprocess; img = r'E:\私域相关资料\南京泊宁资料\8888.jpg'; prn = 'Canon G3000 series Printer (副本 1)'; subprocess.run(['mspaint', '/pt', img, prn])"
Pitfalls
- Do NOT use
cmd /c mspaint /porcmd /c mspaint /ptfrom bash — Chinese path encoding gets mangled. - Do NOT use
powershell Start-Process -Verb Print— it pops up a dialog requiring manual confirmation. - Always use Python
r'...'raw strings for paths. mspaint /pttakes:mspaint /pt <filename> <printername>— just 2 params is enough, no need for driver/port.
Verification
returncode: 0= print job sent successfully.- Check the printer's physical output tray.
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决Windows环境下中文路径打印的编码痛点,实用性强
- 提供完整的端到端打印流程,包含文件验证和打印机选择
Areas to improve
-
触发词覆盖不全 Reported severity: Minor
当前触发词仅包含'print an image/file'和'printing something on Windows',缺少中文场景下的常见表达如'打印图片'、'打印照片'等
Recommendation: 建议补充中文触发词如'打印图片'、'打印照片'、'打印文件'等,提升中文用户触发准确率
Highlights
- 触发词边界清晰,能有效区分打印相关需求
Highlights
- Phase划分清晰,包含确认、查询、执行完整流程
- 提供具体示例和常见陷阱说明,提升用户体验
- frontmatter完整,文档结构规范
Highlights
- 工具来源明确(mspaint),参数使用正确
- 覆盖主要异常场景(中文路径编码问题)
- 提供验证机制和错误码说明
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Invoke commands or scripts
Read the script and arguments first. Use ordinary privileges and a scoped directory; confirm installation or execution in your host tool.
Mentioned in main document · lines 39, 47, 53
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.