SickHub / docker-cups-airprint

A standalone CUPS and Avahi (mDNS/Bonjour) server, exposing local printers on AirPrint for iOS devices
GNU General Public License v3.0
160 stars 38 forks source link

IOS big file printing failed #94

Open Xu-Xihe opened 3 months ago

Xu-Xihe commented 3 months ago

I have already set nearly everything. I tested the notes and webs, they work well. But, when I try to print pdfs, things is changed. I tested a bit and found some wrrong. They could be divide to two conditions by their size. Whatever the kind of file is, the fails could be divided to two conditions by their size. For small one, they could be print successfully. But when big one (photos/pdfs with images etc.) is printed, they will fail. (The size limition seens to be around 100k) On IOS, it will show a pop-up tip says The printer is no longer available, and give two choice: try again and cancel. In the website interface, I could see the task in held since. And if the big files finally printed, their will be a warn:

completed at
Mon Jun 17 08:45:31 2024 
"temp file (object 16 0): object has offset 0"

When I use docker logs -f <name-of-your-container> to show logs, it looks like this:

E [17/Jun/2024:08:18:53 +0000] [Client 45] Unable to encrypt connection: A TLS fatal alert has been received.
E [17/Jun/2024:08:18:54 +0000] [Client 47] Unable to encrypt connection: A TLS fatal alert has been received.
E [17/Jun/2024:08:18:55 +0000] [Client 49] Unable to encrypt connection: A TLS fatal alert has been received.
E [17/Jun/2024:08:18:55 +0000] [Client 51] Unable to encrypt connection: A TLS fatal alert has been received.
E [17/Jun/2024:08:19:00 +0000] [Client 53] Unable to encrypt connection: A TLS fatal alert has been received.
E [17/Jun/2024:08:19:00 +0000] [Client 55] Unable to encrypt connection: A TLS fatal alert has been received.
E [17/Jun/2024:08:19:01 +0000] [Client 57] Unable to encrypt connection: A TLS fatal alert has been received.
E [17/Jun/2024:08:19:03 +0000] [Client 61] Unable to encrypt connection: A TLS fatal alert has been received.
E [17/Jun/2024:08:19:04 +0000] [Client 63] Unable to encrypt connection: A TLS fatal alert has been received.

I searched around, added DefaultEncryption Never into cupsd.conf and restart, but still can't print big files and continuousl showing the pop-up tip. Sometimes I found, after I pressed print for a long time, my printer will work suddenly and print what I wanted before. I suppose that is because the network between IOS and CUPS is not steady enough for big ones to convey. But I have no idea why it is so weak.

DrPsychick commented 3 months ago

Indeed, cups needs quite a bit of ram and or disk space to spool big files. Maybe check out the processes while running the print job : create a shell in the container and check cpu/memory usage. Also, you might find additional log messages within the container that give a clue as to what went wrong (https://serverfault.com/questions/911797/where-does-cups-keep-print-job-information or https://xinet.support.northplains.com/hc/en-us/articles/360020687639-Checking-the-CUPS-Logs-and-Job-Files-on-the-Xinet-Server)

Unfortunately, I no longer have this setup available to test, so I can only help with suggestions and cannot debug myself.

Xu-Xihe commented 3 months ago

I checked all of them but got nothing. There's even no error-files for cups. I noticed that on the Apple Community, someone has share the same question as I am facing. I suppose that the problems is between the virtual Airprint Printer and the IOS17 printing programme. They may have compatibility issues.
By the way, I'm using this image on my Openwrt router with an arm64 chip. May this causes these issues?

DrPsychick commented 3 months ago

Unfortunately, I never used this on arm64, maybe someone from the growing community can share their experience.