Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Skylar Ittner 8f3073d90c | vor 4 Jahren | |
---|---|---|
nbproject | vor 4 Jahren | |
LICENSE.md | vor 4 Jahren | |
README.md | vor 4 Jahren | |
print.php | vor 4 Jahren |
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.