From 2d87214cd0aea9d031a0df148916f967f500e749 Mon Sep 17 00:00:00 2001 From: tothedaring <137025834+tothedaring@users.noreply.github.com> Date: Fri, 23 May 2025 14:35:41 -0400 Subject: [PATCH 1/2] Update NomadNetworkApp.py Update line 1271 (line 253 in config file) to reflect current CUPS options and removing deprecated options per issue 4010 (https://github.com/apple/cups/issues/4010) --- nomadnet/NomadNetworkApp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomadnet/NomadNetworkApp.py b/nomadnet/NomadNetworkApp.py index 81dc68f..3389249 100644 --- a/nomadnet/NomadNetworkApp.py +++ b/nomadnet/NomadNetworkApp.py @@ -1268,7 +1268,7 @@ print_command = lp # This one is more suitable for full-sheet # printers. -# print_command = lp -d PRINTER_NAME -o page-left=36 -o page-top=36 -o page-right=36 -o page-bottom=36 +# print_command = lp -d PRINTER_NAME-o job-priority=100 -o media=Custom.75x75mm -o orientation-requested=3 '''.splitlines() From bf4b9e55aefa54daf55d87e49863108035d645bb Mon Sep 17 00:00:00 2001 From: tothedaring <137025834+tothedaring@users.noreply.github.com> Date: Sun, 25 May 2025 16:01:23 -0400 Subject: [PATCH 2/2] added explanation of CUPS variables and added example for reciept printer --- nomadnet/NomadNetworkApp.py | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/nomadnet/NomadNetworkApp.py b/nomadnet/NomadNetworkApp.py index 3389249..73386cf 100644 --- a/nomadnet/NomadNetworkApp.py +++ b/nomadnet/NomadNetworkApp.py @@ -1259,16 +1259,38 @@ print_messages = No print_command = lp # You can specify what printer to use -# print_command = lp -d PRINTER_NAME +# print_command = lp -d [PRINTER_NAME] # Or specify more advanced options. This # example works well for small thermal- -# roll printers. -# print_command = lp -d PRINTER_NAME -o cpi=16 -o lpi=8 +# roll printers: +# print_command = lp -d [PRINTER_NAME] -o cpi=16 -o lpi=8 # This one is more suitable for full-sheet -# printers. -# print_command = lp -d PRINTER_NAME-o job-priority=100 -o media=Custom.75x75mm -o orientation-requested=3 +# printers. It will print a QR code at the center of any media +# your printer will accept, print in portrait mode, and move the message to +# the top of the print queue: +# print_command = lp -d [PRINTER_NAME] -o job-priority=100 -o media=Custom.75x75mm -o orientation-requested=3 + +# But you can modify the size to fit your needs. +# The custom media option accepts millimeters, centimeters, and +# inches in a width by length format like so: +# -o media=Custom.[WIDTH]x[LENGTH][mm,cm,in] +# +# The job priority option accepts 1-100, though you can remove it +# entirely if you aren't concerned with a print queue: +# -o job-priority=[1-100] +# +# Finally, the orientation option allows for 90 degree rotations beginning with 3, so: +# -o orientation-requested=4 (landscape, 90 degrees) +# -o orientation-requested=5 (reverse portrait, 180 degrees) +# +# Here is the full command with the recommended customizable variables: +# print_command = lp -d [PRINTER_NAME] -o job-priority=[N] -o media=[MEDIA_SIZE] -o orientation-requested=[N] -o sides=one-sided + +# For example, here's a configuration for USB thermal printer that uses the POS-58 PPD driver +# with rolls 47.98x209.9mm in size: +# print_command = lp -d [PRINTER_NAME] -o job-priority=100 -o media=custom_47.98x209.9mm_47.98x209.9mm -o sides=one-sided '''.splitlines()