A simple JSON API that accepts a PDF file over HTTP and prints it via CUPS.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Skylar Ittner 8f3073d90c Attach license file il y a 4 ans
nbproject Init il y a 4 ans
LICENSE.md Attach license file il y a 4 ans
README.md Update readme il y a 4 ans
print.php Init il y a 4 ans

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"]}
  • 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}

Requires lp, lpstat, and pdfinfo commands to be available.