Printing to a remote computer

First run:

sudo apt-get install netcat

And then:

sudo cat my_file.pdf | netcat -w 1 printer_ip 9100

This worked perfectly for me :-)