Send to local WiFi printer a .pdf file to print

I have a WiFi printer (Epson L3150) in my local network and i want to print a .pdf file via Command line (SSH)

For text only i find the
cat test.pdf | nc 192.168.1.5 9100
But it print text, not images.

1 Like

what protocols does the printer support ?

Here the page from settings

Usually printers support postscript as an alternative format to plain text via raw socket on port 9100. While pdf is technically based on the postscript format, it is more complex and usually not natively supported by printers.

You can use ghostscript to convert pdf into postscript (should also work using a pipe) and try to feed that to the printer at port 9100.

WSD is an http-based protocol from Microsoft, I'm not sure about the exact specifications, but there may be libraries to upload pdf documents as print jobs to WSD printers.

i convert the pdf to postscript via Adobe Acrobat but again it print weird-texts and not the image that i want

Unfortunately, almost no Epson printer has native Postscript/PDF rendering support. The L3150 is no exception. You can't just send it a postscript or .pdf file because that printer doesn't know what to do with it. It has to be rendered first in a printer control language your printer understands. In the case of your Epson, it is a very basic control language called "Esc/P R"

In case switching printers is an option, what you want to do is eminently possible with almost all Brother printers. They throw everything at their printers, including Postscript/PDF and PCL, so you can just sent it a .pdf file and it can print it.

If you need to be able to send actual PDFs to your epson, then you need to render them. You'll likely need a full Cups install for this.

You can also try printing the PDF on your computer by connecting your Epson driver to "print to file". This will allow you to produce a file with that document in Epson's printer language, which you can then send to your printer the way you have been. This is likely not very useful though.

3 Likes

Thank you very much for such thorough explanation.
Now i have a better picture of the situation.