Recently, I was working with a library which helps to generate barcode within images, the open source library is called ZXing ( Its a free library with lots of great features and even supports QRCode generation. The only missing feature I came across was of writing a Barcode Text below the generated image. I reached out ZXing support team, here they replied to my thread.

Implementing such functionality in an html page was not that a big task.

Anyway here I came up with a solution. Hope this helps you..
<div style="border: 1px double black;width:50%;text-align:center;" id="PrintBarcode"> 
<div><asp:Image ID="imgBarcode" runat="server" /></div> 
<div style="margin-top:-10px;"><asp:Label ID="lblTexttoDisplay" runat="server"></asp:Label></div> 
</div><br /> 
<a ID="PrintMe" runat="server" Text="Print" onclick=""></a> 
<script type="text/javascript"> 
function PrintMe() 
var popupWin ='', '_blank', 'width=0,height=0,directories=0,fullscreen=0,location=0,menubar=0, 
var divToPrint = document.getElementById('PrintBarcode'); 
popupWin.document.write('<html><body onload="window.print();this.close();"> 
          <div style="border: 0px double black;width:50%;text-align:center;">' + divToPrint.innerHTML + '</div></html>'); 

</script> ASP.NET Core 2.2.1 Hosting
European best, cheap and reliable ASP.NET hosting with instant activation. is #1 Recommended Windows and ASP.NET hosting in European Continent. With 99.99% Uptime Guaranteed of Relibility, Stability and Performace. security team is constantly monitoring the entire network for unusual behaviour. We deliver hosting solution including Shared hosting, Cloud hosting, Reseller hosting, Dedicated Servers, and IT as Service for companies of all size.