Libre Barcode EAN-13 Font not working on SSRS report exported as PDF

Viewed 471

I'm trying to print a barcode in a SSRS report with Visual Studio 2019 using Libre Barcode EAN-13 Font. The column from which I'm getting the numeric code is actually EAN-13 compliant (it's a valid string containing 12 digits and the last one is a valid check digit), so that's not the issue.

In the report preview it works beautifully, but when the report is exported as PDF the barcode font doesn't render correctly. Any format doesn't seem to work once exported, but I've noticed that exporting as a Word file and opening it with LibreOffice Reader works as expected.

Images showing the issue. Notice the third column EAN-13, the others are just examples.

Report preview

Report exported as PDF

I'm using Adobe Acrobat to open the PDF. I already tried many other PDF reader programs but none get the barcode rendered as expected. Also the font (.ttf file) was already installed for all users on the developer pc.

Any ideas?

1 Answers

For anywhone who faces this same issue in the future, please refer to the solution shown in Libre Barcode EAN13 Text official GitHub issue.

SSRS doesn't support OpenType font features, so you'll have to implement a VB function to transform the original 12-digit UPC into an encoded EAN13 string so that it can be displayed as a valid barcode in any exported document format.

Related