I have this older printer HP LaserJet 4200n that used to be connected to my router and I'd just print from any computer, but now the printer was moved and it cannot be connected to the router. I have connected it to my PC (windows 7) with an ethernet cable, but am unable to figure out if this set-up will work or not and unfortunately the printer doesn't have any USB ports.
Is there a way for this to work? How can I do it?

You would have to statically assign the nic of the printer and the pc an IP address on the same network

192.168.100.20 PC192.168.100.21 printer

Subnet 255.255.255.0 will work

If your pc does not have a gigabit nic either get one or get a cross over cable.

This will get you printing.

My PC is connected by wireless and the printer is connected to the only ethernet port (gigabit). Can I still assign the IPs?I have assigned an IP to the nic card earlier, but couldn't get it working (192.168.1.111, subnet 255.255.255.0, gateway 192.168.1.1)