New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Pdf Export

previous daynext daytoday

Select date
Calendar
Title and navigation
Title and navigation
<<<April 2012><<
April 2012
SMTWTFS
       
1234567
891011121314
15161718192021
22232425262728
2930     

Monday, April 16, 2012

all day
8AM
9AM
10AM
11AM
12PM
1PM
2PM
3PM
4PM
5PM
 
Breakfastdelete
 
 
 
Technical meetingdelete
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Click Snooze to be reminded again in:
Snooze
select
  • Configuration
  • Paper SizeA4
    Paper OrientationPortrait
  • Page margin (mm)
    Top25
    Bottom25mm
    Left25mm
    Right25mm
  • Group ByNone
    Grouping DirectionHorizontal
  • Row Height25px
This on-line demo demonstrates the "Export to PDF" feature of RadScheduler.
The approach is very straightforward - to export the scheduler content to PDF format simply use the ExportToPdf() server-side method. You can configure the exporting settings for the scheduler through the RadScheduler.ExportSettings section. Also there is additional sub-category (PDF) dedicated on various configuration settings for the exported .pdf document.The available properties are:
  • FileName - a string specifying the name (without the extension) of the file that will be created. The file extension is automatically added based on the method that is used.
  • OpenInNewWindow - open the exported scheduler in a new instead of the same page
There is additional sub-category (PDF) for the ExportSettings dedicated on various configuration settings for the exported .pdf document. Below is a list of them:
  • AllowAdd - Boolean property which determines whether content adding is allowed
  • AllowCopy - Boolean property which determines whether content copying is allowed
  • AllowModify - Boolean property which determines whether content modifications are allowed
  • AllowPrint - Boolean property which determines whether the PDF document can be printed
  • PageTitle - Sets the title of the page
  • PageLeftMargin - Sets the left margin for the pages in the PDF document
  • PageRightMargin - Sets the right margin for the pages in the PDF document
  • PageTopMargin - Sets the top margin for the pages in the PDF document
  • PageBottomMargin - Sets the bottom margin for the pages in the PDF document
  • PageHeaderMargin - Sets the header margin for the pages in the PDF document
  • PageFooterMargin - Sets the footer margin for the pages in the PDF document
  • PageHeight - Sets the height of the pages in the PDF document
  • PageWidth - Sets the width of the pages in the PDF document
  • Author - Sets the name of the author of the PDF document
  • Keywords - Sets the keywords for the PDF document
  • Subject - Sets the subject of the PDF document
  • Title - Sets the title of the PDF document
  • PaperSize - Enumeration which specifies the paper font size. The default value is Letter
  • Producer - Specifies the producer of the resulting PDF document
  • Creator - Specifies the creator of the resulting PDF document
In Q3 2013 SP1 the following properties were added to the settings:
  • AllowPaging - Boolean property which determines whether the content should be fit into one page or spread across several pages.
  • PaperOrientation - Enumeration which specifies the paper orientation. The default value is Portrait
  • StyleSheets - String which specifies a comma separated list of paths to external stylesheets which be applied to the exported Scheduler.

PDF Export of all the appointments from a specific period in a simple table layout can easily be achieved by exporting Agenda View of RadScheduler.

Note that in order for the exported scheduler to be styled correctly you need to set the Skin property of the RadScheduler.
In the demo the Skin property of the RadScheduler is set from the skin of the StyleSheetManager.

In Q3 2013 SP1 several new features were added to the Export, including support for applying External Stylesheets and Paging

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="Scheduler.Examples.PdfExport.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container">
        <telerik:RadButton RenderMode="Lightweight" Skin="Silk" ID="RadButton1" runat="server" Text="Export to PDF" CssClass="pdfButton"
            ValidationGroup="ValidatePageSize" OnClick="RadButton1_Click">
            <Icon PrimaryIconCssClass="export" />
        </telerik:RadButton>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
            <telerik:RadScheduler RenderMode="Classic" Skin="Silk" runat="server" ID="RadScheduler1" SelectedDate="2012-04-16" Width="700px"
                OverflowBehavior="Auto" EnableDescriptionField="true">
                <Reminders Enabled="true"></Reminders>
                <AgendaView UserSelectable="true" />
                <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
                <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
            </telerik:RadScheduler>
        </telerik:RadAjaxPanel>
        <telerik:RadToolTipManager RenderMode="Lightweight" ID="RadToolTipManager1" Skin="Silk" runat="server" ToolTipZoneID="configuratorPanel"
            AutoTooltipify="true">
        </telerik:RadToolTipManager>

    </div>
    <qsf:ConfiguratorPanel ID="configuratorPanel" runat="server" Title="Configuration">
        <Views>
            <qsf:View ID="View1" runat="server" Title="Page Properties">
                <ul class="fb-group">
                    <li>
                        <qsf:DropDownList runat="server" ID="PaperSize" AutoPostBack="true" Label="Paper Size" Size="Wide">
                            <Items>
                                <telerik:DropDownListItem Value="A4" Text="A4" Selected="true" />
                                <telerik:DropDownListItem Value="A3" Text="A3" />
                                <telerik:DropDownListItem Value="Letter" Text="Letter" />
                                <telerik:DropDownListItem Value="Legal" Text="Legal" />
                                <telerik:DropDownListItem Value="Custom" Text="Custom..." />
                            </Items>
                        </qsf:DropDownList>
                        <qsf:DropDownList runat="server" ID="PaperOrientation" Label="Paper Orientation" Size="Wide">
                            <Items>
                                <telerik:DropDownListItem Value="Portrait" Text="Portrait" Selected="true" />
                                <telerik:DropDownListItem Value="Landscape" Text="Landscape" />
                            </Items>
                        </qsf:DropDownList>
                    </li>
                    <asp:PlaceHolder runat="server" ID="PageDimentions">
                        <li>
                            <qsf:TextBox runat="server" ID="PageWidth" Text="" Label="Page Width (mm):" ToolTip="Controlled by the <b>PageWidth</b> property."></qsf:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="PageWidth"
                                ValidationGroup="ValidatePageSize" Display="Dynamic" ErrorMessage="(You must enter a value)"></asp:RequiredFieldValidator>
                            <asp:CompareValidator runat="server" ID="CompareValidator1" Type="Double" ControlToValidate="PageWidth" Display="Dynamic"
                                ValidationGroup="ValidatePageSize" ErrorMessage="(The entered value must be a valid number)"></asp:CompareValidator>
                        </li>
                        <li>
                            <qsf:TextBox runat="server" ID="PageHeight" Text="" Label="Page Height (mm):" ToolTip="Controlled by the <b>PageHeight</b> property."></qsf:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="PageHeight"
                                ValidationGroup="ValidatePageSize" Display="Dynamic" ErrorMessage="(You must enter a value)"></asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="CompareValidator2" runat="server" Type="Double" ControlToValidate="PageHeight" Display="Dynamic"
                                ValidationGroup="ValidatePageSize" ErrorMessage="(The entered value must be a valid number)"></asp:CompareValidator>
                        </li>
                    </asp:PlaceHolder>
                    <li></li>
                    <li>
                        <span class="label">Page margin (mm)</span>
                        <qsf:DropDownList runat="server" ID="PageTopMargin" Label="Top" Size="Narrow">
                            <Items>
                                <telerik:DropDownListItem Value="0mm" Text="0" />
                                <telerik:DropDownListItem Value="10mm" Text="10" />
                                <telerik:DropDownListItem Value="25mm" Text="25" Selected="true" />
                                <telerik:DropDownListItem Value="50mm" Text="50" />
                            </Items>
                        </qsf:DropDownList>
                        <qsf:DropDownList runat="server" ID="PageBottomMargin" Label="Bottom" Size="Narrow">
                            <Items>
                                <telerik:DropDownListItem Value="0mm" Text="0" />
                                <telerik:DropDownListItem Value="10mm" Text="10" />
                                <telerik:DropDownListItem Value="25mm" Text="25mm" Selected="true" />
                                <telerik:DropDownListItem Value="50mm" Text="50mm" />
                            </Items>
                        </qsf:DropDownList>
                        <qsf:DropDownList runat="server" ID="PageLeftMargin" Label="Left" Size="Narrow">
                            <Items>
                                <telerik:DropDownListItem Value="0mm" Text="0mm" />
                                <telerik:DropDownListItem Value="10mm" Text="10mm" />
                                <telerik:DropDownListItem Value="25mm" Text="25mm" Selected="true" />
                                <telerik:DropDownListItem Value="50mm" Text="50mm" />
                            </Items>
                        </qsf:DropDownList>
                        <qsf:DropDownList runat="server" ID="PageRightMargin" Label="Right" Size="Narrow">
                            <Items>
                                <telerik:DropDownListItem Value="0mm" Text="0mm" />
                                <telerik:DropDownListItem Value="10mm" Text="10mm" />
                                <telerik:DropDownListItem Value="25mm" Text="25mm" Selected="true" />
                                <telerik:DropDownListItem Value="50mm" Text="50mm" />
                            </Items>
                        </qsf:DropDownList>
                    </li>
                    <li>
                        <asp:CheckBox ID="AllowPaging" runat="server" Text="Allow Paging" AutoPostBack="true" />
                    </li>
                </ul>
            </qsf:View>
            <qsf:View Title="File Properties" runat="server">
                <div class="col col-medium">
                    <ul class="fb-group">
                        <li>
                            <qsf:TextBox runat="server" ID="FileName" Text="Scheduler Export" Label="File Name" ToolTip="Controlled by the <b> FileName </b> property."></qsf:TextBox>
                        </li>
                        <li>
                            <qsf:TextBox runat="server" ID="PageTitle" Text="Schedule" Label="Page Title" ToolTip="Controlled by the <b> PageTitle </b> property."></qsf:TextBox>
                        </li>
                        <li>
                            <qsf:TextBox runat="server" ID="Author" Text="Telerik" Label="Author" ToolTip="Controlled by the <b> Author </b> property."></qsf:TextBox>
                        </li>
                    </ul>
                </div>
                <div class="col col-medium">
                    <ul class="fb-group">
                        <li>
                            <qsf:TextBox runat="server" ID="Creator" Text="Schedule" Label="Creator" ToolTip="Controlled by the <b> Creator </b> property."></qsf:TextBox>
                        </li>
                        <li>
                            <qsf:TextBox runat="server" ID="Title" Text="Schedule" Label="Title" ToolTip="Controlled by the <b> Title </b> property."></qsf:TextBox>
                        </li>
                        <li>
                            <asp:CheckBox ID="OpenInNewWindow" runat="server" Text="Open in new window" AutoPostBack="true" />
                        </li>
                    </ul>
                </div>
            </qsf:View>
            <qsf:View Title="Scheduler Properties" runat="server">
                <ul class="fb-group">
                    <li>
                        <qsf:DropDownList runat="server" ID="GroupBy" AutoPostBack="true" Label="Group By" Size="Medium">
                            <Items>
                                <telerik:DropDownListItem Value="" Text="None" Selected="true" />
                                <telerik:DropDownListItem Value="User" Text="User" />
                                <telerik:DropDownListItem Value="Date,User" Text="Date,User" />
                            </Items>
                        </qsf:DropDownList>
                        <qsf:DropDownList runat="server" ID="GroupingDirection" AutoPostBack="true" Label="Grouping Direction" Size="Medium">
                            <Items>
                                <telerik:DropDownListItem Value="Horizontal" Text="Horizontal" Selected="true" />
                                <telerik:DropDownListItem Value="Vertical" Text="Vertical" />
                            </Items>
                        </qsf:DropDownList>
                    </li>
                    <li>
                        <qsf:DropDownList runat="server" ID="RowHeight" AutoPostBack="true" Label="Row Height" ToolTip="Controlled by the <b>RowHeight</b> property.">
                            <Items>
                                <telerik:DropDownListItem Value="25" Text="25px" Selected="true" />
                                <telerik:DropDownListItem Value="40" Text="40px" />
                                <telerik:DropDownListItem Value="50" Text="50px" />
                            </Items>
                        </qsf:DropDownList>
                    </li>
                </ul>
            </qsf:View>
        </Views>
    </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance