PDF export not applying custom stylesheet

2 posts, 0 answers
  1. Sean
    Sean avatar
    3 posts
    Member since:
    Apr 2011

    Posted 08 Jan Link to this post

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

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 13 Jan Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top