SAP Knowledge Base Article - Public

2403942 - Error when Printing barcodes from WPF-Viewer using Barcode39-25plus and possibly other barcode fonts


We are using Barcode39-25plus in a Crystal Reports for Visual Studio SP 17 application and having an issue when printing the report, the barcode is not readable by a scanner.


  • Crystal Reports for Visual Studio
  • Microsoft Visual Studio 2015 using 4.6 framework

Reproducing the Issue

We ran a couple tests, and got these results:

1. With font code39 installed and font code39-25 - in the problem area we got 3 equally thick bars instead of 2 thick and 2 thin.  This is occurring because of font substitution.

2. With both fonts installed and VS 2010 and 4.0 framework - the barcode can be read correctly about 80% of the time

3. With both fonts installed and VS 2015 and 4.6 framework - the barcode is unreadable and we get 2 thick bars and 1 semi-thick bar where the two thin bars were combined together.



This issue was escalated to our Developers with these results:

It is a WPF print issue and it seems WPF doesn’t support Barcode39-25plus.ttf well in new .net framework 4.6. 

  1. I created a sample wpf app in vs2015, it simply prints a string in Barcode39-25plus.ttf. In old framework, the result’s good, and in new framework, the result’s bad, if I print it to pdf995 driver, the page is empty.  
  2. In test app, there’re no CR related codes so we may say WPF doesn’t support such fonts well in new framework.
  3. This is a Framework or possibly a Font issue. Nothing we can do to resolve the issue other than to suggest using the CR Windows.Form Viewer

Only option at this time is to use 4.0 framework


Barcode39-25plus, cr for vs, 4.6 framework , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem


SAP Crystal Reports, developer version for Microsoft Visual Studio