How would you get an application, such as Firefox or Chrome, to know to use netcat to print?
Bye CUPS: Printing with Netcat
11–20 of 183 posts
Re: Bye CUPS: Printing with Netcat
#12How would you get an application, such as Firefox or Chrome, to know to use netcat to print?
If I want to print multiple pages per sheet: Open PDF in Firefox, CTRL+P -> Save to PDF and configure the document. You can also pipe through `gs` to do this.
For _huge_ documents (100s of pages), I'll pipe through `gs` first to do the pdf->ps conversion on my laptops CPU. The printer can do it, it just takes a lot longer.
Re: Bye CUPS: Printing with Netcat
#13Re: Bye CUPS: Printing with Netcat
#14Edit: It took about 5 mins to print a 3-page document, with long pauses between each page.
Re: Bye CUPS: Printing with Netcat
#15http://danieru.com/2013/06/06/what-is-port-9100-how-to-print...
While you're at it you may as well try out the printer exploit kit https://github.com/RUB-NDS/PRET
Re: Bye CUPS: Printing with Netcat
#16Re: Bye CUPS: Printing with Netcat
#17How would you get an application, such as Firefox or Chrome, to know to use netcat to print?
Choose Jetdirect/Appsocket in the printer add menu and it will do the same thing. There is nothing magic about netcat. You are just dumping Postscript/PDF data on a TCP port the printer is listening on.
I can put `nc [printer_ip] 9100` there and it will just print. I just printed your comment this way.
That's cool! Thank you for teaching me something!
Re: Bye CUPS: Printing with Netcat
#18This is how this Hackernews printed several pages worth of the plaintext representation of a PDF on an office printer a few years ago before figuring out how to cancel the job.
Re: Bye CUPS: Printing with Netcat
#19I just tried this and while it worked, it was very slow. It takes a minute to start printing a page in a PDF, meanwhile nc is still hanging and sending the data, seemingly very slowly. The printer is constantly showing "Receiving Data" on its screen. The PDF is only 450KB. Edit: It took about 5 mins to print a 3-page document, with long pauses between each page.
Re: Bye CUPS: Printing with Netcat
#20I just tried this and while it worked, it was very slow. It takes a minute to start printing a page in a PDF, meanwhile nc is still hanging and sending the data, seemingly very slowly. The printer is constantly showing "Receiving Data" on its screen. The PDF is only 450KB. Edit: It took about 5 mins to print a 3-page document, with long pauses between each page.
I suspect it's the printer doing the pdf->ps conversion. I have a beefy printer, so only run into this for large documents. But I'll cat through `gs` then to `nc` to do the pdf->ps conversion locally, and it is much faster.