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

PDF export not applying custom stylesheet

1 Answer 196 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 08 Jan 2016, 11:27 PM

Using the same exact markup and code on two different sites only difference is the Telerik.Web.UI.dll version.

The Q3 2015 version (2015.3.930.45) is not applying the custom style sheet on PDF export.

 Is there a bug in that version regarding custom style on export? Very simple page below where I'm just changing the Header color from Green to Red on export to show it isn't working.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
<style type="text/css">
          
     html .RadScheduler .rsHeader h2 {
        color:green;
    }
 
    
</style>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
     
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
        <script type="text/javascript">          
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>             
            </AjaxSettings>
        </telerik:RadAjaxManager>
<div class="exampleContainer">
    <telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedDate="2012-04-16"
        OverflowBehavior="Auto">
        <Reminders Enabled="true"></Reminders>
        <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
        <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
        <ExportSettings OpenInNewWindow="true" FileName="SchedulerExport">
            <Pdf PageTitle="Schedule" Author="Telerik" Creator="Telerik" Title="Schedule" StyleSheets="ExportStyle.css"></Pdf>
        </ExportSettings>
    </telerik:RadScheduler>
    <p>
        <telerik:RadButton ID="RadButton1" runat="server" Text="Export to PDF" OnClick="RadButton1_Click">
            <Icon PrimaryIconUrl="Image/pdf.gif"></Icon>
        </telerik:RadButton>    
    </p>
</div>
    </form>
</body>
</html>

 

ExportStyle.css

 

html .RadScheduler .rsHeader h2 {
        color:red;
    }

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 13 Jan 2016, 04:18 PM
Hello Sean,

We tested the export using the code you provided and at our end the style in the ExportStyle.css was correctly applied to the exported Scheduler, coloring the text of its header in red.
I am attaching the sample website we used to test the export with version 2015.3.930.45. Could you please modify it so that it reproduces the issue and post your modifications for further review? 
The Telerik .dll files are missing from the "bin" folder and have to be added.

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Scheduler
Asked by
Sean
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or