We have an application that uses a bar code font within an RDLC report, and we want to migrate this from a VM to Azure app services (formerly web apps). The issue here is that we obviously don't have the ability to install the font. I am pretty sure RDLC uses GDI+ to render the reports, so I was hoping I could find a method/property on the LocalReport that would give me the ability to set some sort of PrivateFontCollection, but I have hit a brick wall.
So I guess I have a couple questions that might help get this figured out, otherwise we will need to come up with another reporting solution:
- Is there a generic way to temporarily install a font in .NET that can be used by the current application?
- Is there a way to specify a PrivateFontCollection anywhere in a LocalReport object?
RDLC report refer to the font by the family name. To use a third party font, we have to actually install the font on your production machine.
Here is feedback from SQL Server Reporting Services team.
The ReportViewer's rendering extensions do not support PrivateFontCollection.
As a workaround, you could generate the barcode into a image without using private font and put the image on your RDLC report. Here is a source code and test code to generate a barcode image file.
Here is the barcode image generated by upper code.