Completed
Last Updated: 10 Sep 2021 11:37 by ADMIN
Release R3 2021
Babar
Created on: 17 Jun 2021 14:00
Category: ClientExportManager
Type: Bug Report
2
Export to PDF Title is No Longer Working as Expected

Issue: Filename is represented as ýý instead of the value given to the ExportSettings-Pdf-FileName property.

The issue is observed with RadClientExportManager and RadGantt as both share the same html.pdf.js dependency.

Reproduction code: 

 

<telerik:RadGantt RenderMode="Lightweight" runat="server" ID="RadGantt1"
    DataSourceID="TasksDataSource" ReadOnly="true"
    EnablePdfExport="true">
    <ExportSettings>
        <Pdf FileName="mytitle" />
    </ExportSettings>
    <DataBindings>
        <TasksDataBindings
            IdField="ID" ParentIdField="ParentID"
            StartField="Start" EndField="End"
            OrderIdField="OrderID"
            SummaryField="Summary"
            TitleField="Title" PercentCompleteField="PercentComplete" />
    </DataBindings>
</telerik:RadGantt>
<asp:SqlDataSource ID="TasksDataSource" runat="server"
    ProviderName="System.Data.SqlClient"
    ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
    SelectCommand="SELECT TOP 1 * FROM [GanttTasks]">
</asp:SqlDataSource>

 

 

Solution provided by Admin:

1) Download the html5.pdf.js file from the source code. You can download it from your account, the Source code section. The path to the file is \Telerik.Web.UI\Common\HTML5UI\html5.pdf.js

 

2) Load the attached file via the ScriptManager/RadScriptManager or right after it:

 

<telerik:RadScriptManager ID="RadScriptManager1" OnResolveScriptReference="RadScriptManager1_ResolveScriptReference1" runat="server">
</telerik:RadScriptManager>
<%-- The same approach works if you use asp:ScriptManager --%>
    <%--<asp:ScriptManager ID="ScriptManager1" OnResolveScriptReference="RadScriptManager1_ResolveScriptReference1" runat="server">
</asp:ScriptManager>--%>

 

 

protected void RadScriptManager1_ResolveScriptReference1(object sender, ScriptReferenceEventArgs e)
{
    if (e.Script.Name == "Telerik.Web.UI.Common.HTML5UI.html5.pdf.js")
    {
        // adjust the path to the actual path of your override file
        e.Script.Path = "/html5.pdf.js";
    }
}

 

 

 

0 comments