ClientExportManager - Export Special Characters

  • Swedish:
    Uppkomsten av Stockholm som boplats och senare som stad hänger intimt samman med isoleringen av Mälaren från Östersjön, som har pågått sedan senaste istiden, då den avsmältande inlandsisen lättade på trycket mot jordskorpan.
  • Greek:
    Η κληρονομιά της κλασικής εποχής είναι ακόμη ολοφάνερη στην πόλη, εκπροσωπούμενη από αρχαία μνημεία και έργα τέχνης, με περιφημότερο όλων τον Παρθενώνα, που θεωρείται βασικό ορόσημο του αρχαίου Δυτικού πολιτισμού.
  • Portuguese:
    Segundo uma teoria de Bochart, o nome Olisipo, designação pré-romana de "Lisboa", remontaria aos Fenícios. Segundo esta teoria, Olisipo derivaria de "Allis Ubbo" ou "Porto seguro" em fenício, dado o porto fornecido pelo Estuário do Tejo.
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

The example demonstrates how you can export text containing special characters

In order to export the special characters a custom font that supports non-ASCII characters has to be included in the project, added to the RadClientExportManager's PdfSettings.Fonts collection and set to the element you want to export. This example demonstrates special characters export with the help of the CODE2000 font, which supports Unicode characters. The font has to be set as a font-family of the element exported, in this example it is the text-container div:

.text-container {
    font-family: 'CODE2000';
}

Export of right-to-left scripts is currently not supported.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Title="" Language="C#"  AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Client_Export_Manager_ApplicationScenarios_Export_Special_Characters_DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container">
        <div class="text-container">
            <ul>
                <li>
                    <span><strong>Swedish:</strong></span>
                    <br />
                    <span>Uppkomsten av Stockholm som boplats och senare som stad hänger intimt samman med isoleringen av Mälaren från Östersjön, som har pågått sedan senaste istiden, då den avsmältande inlandsisen lättade på trycket mot jordskorpan.</span>
                </li>
                <li>
                    <span><strong>Greek:</strong></span>
                    <br />
                    <span>Η κληρονομιά της κλασικής εποχής είναι ακόμη ολοφάνερη στην πόλη, εκπροσωπούμενη από αρχαία μνημεία και έργα τέχνης, με περιφημότερο όλων τον Παρθενώνα, που θεωρείται βασικό ορόσημο του αρχαίου Δυτικού πολιτισμού.</span>
                </li>
                <li>
                    <span><strong>Portuguese:</strong></span>
                    <br />
                    <span>Segundo uma teoria de Bochart, o nome Olisipo, designação pré-romana de "Lisboa", remontaria aos Fenícios. Segundo esta teoria, Olisipo derivaria de "Allis Ubbo" ou "Porto seguro" em fenício, dado o porto fornecido pelo Estuário do Tejo.</span>
                </li>
            </ul>
        </div>
        <input type="button" onclick="exportElement()" value="export" />

        <telerik:RadClientExportManager runat="server" ID="RadClientExportManager1">
            <PdfSettings FileName="Myfile.pdf" />
        </telerik:RadClientExportManager>
    </div>
    <script type="text/javascript">
            var $ = $telerik.$;

            function exportElement() {
                var exp = $find("<%= RadClientExportManager1.ClientID %>");
                exp.exportPDF($telerik.$(".demo-container"));
            }
    </script>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?