New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Displaying Glyph Characters when Using PDFViewer


Product Telerik UI for ASP.NET MVC PDFViewer
Progress Telerik UI for ASP.NET MVC version Created with the 2023.2.718 version


How can I load and display a PDF file that contains glyph characters in the Telerik UI for ASP.NET MVC PDFViewer?


The PDF standard fonts cover only the basic ASCII character set. By design, if no alternate fonts are specified, Kendo UI will bundle the DejaVu font family. For this reason, if the PDF file contains glyph characters, they will not be rendered correctly when loading the file into the PDFViewer.

The following example showcases how to proceed when the PDF file contains Simplified Chinese characters.

  1. Include the 'SimSun' font family by using the CSS font-face declaration.

            @@font-face {
                font-family: 'SimSun';
                    src: url('/SimSun-01.ttf') format('truetype');
            #example {
                font-family: 'SimSun'; // Use the SimSun font for displaying and embedding in the PDF file.
  2. Specify the Character Mapping files (CMap) in the PDFViewer declaration, which are used in the PDF.js library to map the 'SimSun' characters to their corresponding Unicode code points. Use the CMapUrl() and CMapPacked() opions.

        <script src=""></script>
            window.pdfjsLib.GlobalWorkerOptions.workerSrc = '';
        <div id="example">
                .PdfjsProcessing(pdf => pdf
                    .File(c => c

More ASP.NET MVC PDFViewer Resources

See Also

In this article