that is not what a network gateway is, a gateway is a connection to another network, like the "web", and you usually do it through a router with a firewall.
it sounds like you want to make TrueNAS a print server? definitely not sure, but you definitely should read the forum rules.
knowing what your printer is might help someone tell you if this is even possible, but note that just getting a network capable printer would probably be dramatically easier.