您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Skylar Ittner 8f3073d90c | 4 年前 | |
---|---|---|
nbproject | 4 年前 | |
LICENSE.md | 4 年前 | |
README.md | 4 年前 | |
print.php | 4 年前 |
README.md
A simple script that accepts a PDF file over HTTP and prints it.
Usage:
print.php?action=list
: Returns a JSON list of available printers.- Example response:
{"printers": ["canon-123", "brother-etc"]}
- Example response:
print.php?action=print&printer=[printername]
: Print a PDF to the specified printer. The request body shall contain the PDF document.- Example curl command:
curl --data-binary "@/home/user/test.pdf" "http://localhost/print.php?action=print&printer=brother-etc"
- Response:
{"printed": true}
- Example curl command:
Requires lp
, lpstat
, and pdfinfo
commands to be available.