Barcode font IDAutomationHC39M not working

I have a small test app that takes a html file and converts it to pdf using Aspose.pdf.
The html contains some text wrapped in the font IDAutomationHC39M which should result in a barcode being displayed in the pdf. This is indeed the case when i run the app on my box or on our server. However, on a customer server it does not work.
The font IDAutomationHC39M is installed on the customer server. In fact, my app runs some C# to check that it is installed and confirms it is.
htmlToPDFBarcodeTest.zip (2.9 MB)

@richard.botting

Would you please try to run this scenario with 25.1 version of the API in the system where this issue is happening? Also, please share complete details of the system like OS Name and Version, etc. so that we can further proceed with the investigation accordingly.

Added an image of the server spec:
Media.jpg (210.6 KB)

@richard.botting

Looks like you are editing the HTML template before converting it to PDF document. Please share the final HTML that is generated at your end before performing converting to the PDF. This way we will only be testing with the minimal code snippet i.e. HTML to PDF Conversion. Also, please share a copy of font file that is necessary for the barcode to render correctly.

The code I have sent you produces 2 pdf files. The second pdf is produced by the code below. It is as basic as can be, it takes the html as is, and converts it.

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//TEST 2 - most basic to rule the complex code
string test2 = “.\Template\Adult SCI Diebetes.html”;
// Load the HTML file into a document using HtmlLoadOptions
options = new Aspose.Pdf.HtmlLoadOptions();

// Open the source HTML document
using (var document = new Aspose.Pdf.Document(test2, options))
{
// Save the document
document.Save(“C:\Temp\PDFS\OutputBasic.pdf”);
}

I have attached the ttf file used for the font installation.

idautomationhc39m.zip (11.1 KB)

@richard.botting

We have obtained below result in our environment:

image.png (43.3 KB)

It has only one place where barcode was rendered in PDF. Please let us know if this is expected? It looks like the font related issue at your customer’s end. The default location of the font may be changed in his system? Is it possible if you could investigate more on his end and share the details with us? For example, you can try running FontRepository.FindFont() method to check if font exists in his system or not.

I have now tried the latest version of Aspose.Pdf, 25.1. This actually works. I’m confused as to how the version we have, 20.9, works on our server but does not work on our customer site?

@richard.botting

It is possible that there was some issue in the older version of the API which got resolved now. That is why we always recommend using the latest version of the API because it contains maximum fixes. Please upgrade to the latest version and let us know in case you still face any issues.