Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| software:receiptprinterd [2025/12/31 11:17] – diamond | software:receiptprinterd [2026/01/05 07:06] (current) – unfluff diamond | ||
|---|---|---|---|
| Line 11: | Line 11: | ||
| ### Printing Text | ### Printing Text | ||
| - | To print a simple string, it should do: | + | To print a simple string: |
| - | `curl -L http:// | + | ```sh |
| + | curl -L http:// | ||
| + | ``` | ||
| - | To print a file or print from stdin, it should do: | + | To print a file: |
| - | `curl -L http:// | + | ```sh |
| + | curl -L http:// | ||
| + | ``` | ||
| + | |||
| + | To print from stdin: | ||
| + | |||
| + | ```sh | ||
| + | echo " | ||
| + | ``` | ||
| ### Printing an Image | ### Printing an Image | ||
| - | To print an image, it should do: | + | To print an image: |
| - | `curl -L http:// | + | ```sh |
| + | curl -L http:// | ||
| + | ``` | ||
| - | Any image format supported by [Pillow](https:// | + | Any image format supported by [Pillow](https:// |
| If the image is too wide, it will be automatically shrunk. | If the image is too wide, it will be automatically shrunk. | ||
| Line 31: | Line 43: | ||
| If the image is in landscape orientation, | If the image is in landscape orientation, | ||
| - | If the image is too dark, it can try: | + | If the image is too dark, you can set the brightness filter: |
| ```bash | ```bash | ||
| Line 37: | Line 49: | ||
| -F " | -F " | ||
| -F " | -F " | ||
| - | |||
| ``` | ``` | ||
| Line 44: | Line 55: | ||
| ### Printing a QR Code | ### Printing a QR Code | ||
| - | To print a QR code encoding some text, it should do: | + | To print a QR code encoding some text: |
| - | `curl -L http:// | + | ```sh |
| + | curl -L http:// | ||
| + | ``` | ||
| ### Printing Without Cutting (Continuous Printing) | ### Printing Without Cutting (Continuous Printing) | ||
| Line 52: | Line 65: | ||
| By default, after each printing request, the server will command the printer to cut the paper. To change this behavior, add: | By default, after each printing request, the server will command the printer to cut the paper. To change this behavior, add: | ||
| - | `-F cut=false` | + | ``` |
| + | -F cut=false | ||
| + | ``` | ||
| - | It may also manually command the printer to cut via a request: | + | You may also manually command the printer to cut via a request: |
| - | `curl -L -X POST http:// | + | ```sh |
| + | curl -L -X POST http:// | ||
| + | ``` | ||
| ### API Documentation | ### API Documentation | ||