This online demo demonstrates the export to PDF feature of RadGantt.
The approach is very straight-forward - setting the EnablePdfExport
property to true appends an Export button to the control toolbar. There is also a
built in exportToPdf Client-side method, which can be used to trigger
the export functionality from code. All of the processing is done on the client, so
no postbacks are needed.
The Gantt control also exposes several properties which can be used to control the
appearance of the resulting PDF page. They are located in the
RadGantt.ExportSettings.Pdf section, and include:
- Author - Sets the name of the author of the PDF document.
- Creator - Specifies the creator of the resulting PDF document.
- Date - The date when the PDF document is created.
- FileName - Specifies the file name of the exported PDF document.
- Keywords - Specifies the keywords of the exported PDF document.
- Landscape - Boolean value indicating whether the resulting document
orientation is portrait or landscape.
- MarginBottom - Sets the bottom margin of the page.
- MarginLeft - Sets the left margin of the page.
- MarginRight - Sets the right margin of the page.
- MarginTop - Sets the top margin of the page.
- PaperSize - Specifies the paper size of the PDF document.
The default "auto" means paper size is determined by content. You can also set
a predefined size, such as "A4", "A3" etc.
- ProxyURL - The URL of the server side proxy which will stream
the file to the end user. A proxy will be used when the browser isn't capable of
saving files locally (IE version 9 and lower and Safari). The developer is responsible
for implementing the server side proxy.
- Subject - Sets the subject of the PDF document.
- Title - Sets the title of the PDF document.