title: How to send a Label Print Job to a network CUPS/Raspberry Pi print server from a .NET Core Web API server docker container?
body: <p>What I have currently completed:</p>
  <ul>
  <li>setup a Raspberry Pi with CUPS, plugged in a Dymo Labelwriter 450.</li>
  <li>Followed this link: <a href="https://circuitdigest.com/microcontroller-projects/raspberry-pi-print-server" rel="nofollow noreferrer">Setup Raspberry Pi</a>. This works and prints fine on my local machine (Windows), if i install the network printer through windows on my home network.</li>
  <li>Have printing jobs successfully print from .NET Core locally via the <code>System.Drawing.Printing</code>. This was mainly for testing. This is when the USB label printer is plugged directly into my machine.</li>
  <li>Have a .NET Core (3.1) Web API server running from a docker container. (Installed on an Ubuntu Server). FWIW it is a VueJs front end in a separate docker container.</li>
  </ul>
  <p>In our facility (imagine it like a warehouse manufacturing facility) I would like to have a raspberry pi used as a &quot;plug and play&quot; printer server so we can move the Pi and the label printers around and the Pi will stay on the local network via Wifi. For now, these Raspberry Pi's will have a static IP address.</p>
  <p>My dream goal, is to send a print job to the static ip of the CUPS server (the Raspberry Pi) without having to install the network printer within the docker container. For now i could store the IP address and configuration of the printer in the same database the server accesses.<br />
  I would also like it to be agnostic from the printer. So the only configuration or setup i need to worry about is installing the printer within CUPS.</p>
  <p>I have currently researched:</p>
  <ul>
  <li>Printer Languages, like ZPL, EPL. This seems to no allow for printers to be agnostic.</li>
  <li>IPP (Internet Printing Protocol). This seems like a large learning curve and i cant find anything that uses .NET Core. Also not sure if this accomplishes the goal. (Any advice is appreciated)</li>
  <li>Some paid 3rd Party solutions: <a href="https://www.neodynamic.com/products/printing/raw-data/aspnet-mvc/download/" rel="nofollow noreferrer">Neodynamic libraries</a>. But I am not sure if this will accomplish the goal, as it seems to utilize the list of Installed Printers.</li>
  </ul>
  <p>I am trying to avoid installing printers within the docker container. As then it is not stateless and I will need to maintain this somehow. However, I am not totally opposed to compromising for this solution. However, it is outside my knowledge of docker and ubuntu/linux.</p>
  <p>I would ultimately like everything to be contained in my .NET Core project/container. So if i have to send somethings to the CUPS server in a printer language, I am more willing to compromise with being married to a specific Printer brand/model, than installing a printer in the docker container. The print jobs are required to be sent from the Server (not the front end web client) as there are checks and verification's done with the database before printing.</p>
  <p>The other, less desired, solution is to just plug the label printer into the physical server machine, and somehow share the USB port of the machine with the Docker container to send print jobs too. However, this is currently above my head for docker experience. Also it is physically restricting within the facility.</p>
  <p>Is there a way to install printers programmatically? (i doubt this option is possible)</p>
  <ul>
  <li>as that would allow me to control the printers from my code through configuration or hard-coded values.</li>
  </ul>
  <p>What is the best way to send a print job to a Raspberry Pi CUPS server, over a local network, without installing the printer on your machine (i.e. the docker container)?</p>