You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Skylar Ittner febd65e980 | 4 years ago | |
---|---|---|
nbproject | 4 years ago | |
README.md | 4 years ago | |
print.php | 4 years ago |
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"
- Example curl command:
Requires lp
, lpstat
, and pdfinfo
commands to be available.