This is a migrated thread and some comments may be shown as answers.

Export to PDF Spanish accent

1 Answer 132 Views
Chart
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Feb 2015, 09:31 AM
Hi there,

We are using Kendo Charts in our application. We can successfully export the charts using the following jQuery.

 var chart = $("#" + idChart).getKendoChart();
        chart.exportPDF({ paperSize: "auto", margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" } }).done(function (data) {
            kendo.saveAs({
                dataURI: data,
                fileName: "chart.pdf",
                proxyURL: "@Url.Action("Export_Save", "Home")"
            });
        });

But spanish accents are not rendering properly in the output PDF. Is there any configuration to be set?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 12 Feb 2015, 05:14 PM
Hi David,

I replied to the same question in your other thread, however here is my answer too:

In order to get everything correctly rendered you should import "DejaVu Sans" font for embedding: 
<script>
    // Import DejaVu Sans font for embedding
   
    // NOTE: Only required if the Kendo UI stylesheets are loaded
    // from a different origin, e.g. cdn.kendostatic.com
    kendo.pdf.defineFont({
        "DejaVu Sans"             : "http://cdn.kendostatic.com/2014.3.1314/styles/fonts/DejaVu/DejaVuSans.ttf",
        "DejaVu Sans|Bold"        : "http://cdn.kendostatic.com/2014.3.1314/styles/fonts/DejaVu/DejaVuSans-Bold.ttf",
    });
</script>
and set "DejaVu Sans" font to the chart title, labels etc. For your convenience I prepared a basic example - please check it and let me know if this information helps or I can assist you further. I wish you a great day!

Regards,
Iliana Nikolova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart
Asked by
David
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or