Variable Data Scans In Enterprise Browser

I am trying to develop a web app that allows users to scan variable text into text inputs, print a label with the variable data on it, then reset the fields. I would like to embed all the label data into the html file so that the labels don't have to be exported to every printer on the network.

I can print static ZPL from the web app but I can't seem to get my printData function to recognize a variable with HTML data. Is there a way to do this?