RupmPrinter is designed to be a multi-platform printer server & frontend application for SJTU Library Printing System.
It is a reversed version of the official UPMClient
Windows driver from Unifound
.
R as in Rust
/Reverse
/Rewrite
.
It works as a Sockets Server, a PCL Interpreter and a Frontend Client on Windows
/Linux
/MacOS
.
On Windows
it can also work as a patch of the original client.
- Rename
RustPrinter.exe
toUPMPrinter.exe
- Replace
C:\upmclient\UPMPrinter.exe
with the new one.
- Install CUPS (Usually preinstalled)
- Register the printer (Please make sure port 6981 is available)
lpadmin -p RupmPrinter -E -v socket://127.0.0.1:6981 -m drv:///sample.drv/laserjet.ppd
Note: You can change the PPD file to other PCL5 compatible files.
- Run the client
- Choose
RupmPrinter
as target when printing
- 判断客户端上传是否一定需要IP地址作为目标:不用
- 首先读取Cookie, 使用
Auth/Check
判断或者获取新Cookie - 使用
GetAuthToken
获取szToken
,用于构建二维码。 - 手机扫码访问
UniAuth.aspx
界面进行授权 - 可以使用阻塞的HTTP访问判断是否授权完成
- 此时Cookie生效,使用
Auth/Check
可以判断 - 持久化Cookie
- 后续可以随意调用API。
- 从打印任务中获取必要信息
- 发送HTTP请求,创建Job
-
使用UseCompress.dll
压缩PJL文件gzip
. - 发送HTTP请求,上传文件
- 发送结束请求
- 清除打印队列内容和临时文件。
- 类Unix系统支持
-
编写CUPS Backend -
编写PPD文件 - Use Socket Backend
- PCL Intepretation (GhostPDL?)
-
- 查看当前在线队列
- 查询历史打印信息
-
使用IPP提供服务 - 接入网页端PDF上传接口
- GhostPCL(PDL): AGPL 3.0
AGPL 3.0
Checkout GitHub Action Files