Unplanned
Last Updated: 17 Jun 2021 14:02 by ADMIN
Babar
Created on: 17 Jun 2021 14:00
Category: ClientExportManager
Type: Bug Report
1
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:

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";
    }
}

 

 

 

Attached Files:
0 comments