Rendering Project Data on Predefined Page Sizes
Contents
[
Hide
Show
]Aspose.Tasks for .NET supports rendering project views such as Gantt charts, task usage, resource usage and resource sheets to pre-defined page sizes, for example A0, A1, Letter, etc. The PageSize enumeration provides the following pre-defined page sizes:
- A0
- A1
- A2
- A3
- A4
- Ledger
- Letter
Rendering Project Data to Pre-Defined Page Sizes
The following code sample shows how to render a project’s different views to pre-defined page sizes.
1Project project = new Project("New Project.mpp");
2
3// Render the project to all Pre-Defined page sizes
4foreach (PageSize pageSize in (PageSize[])Enum.GetValues(typeof(PageSize)))
5{
6 PdfSaveOptions options = new PdfSaveOptions();
7 options.PresentationFormat = PresentationFormat.GanttChart;
8 options.FitContent = true;
9 options.PageSize = pageSize;
10 project.Save("PredefinedPageSizes_" + pageSize.ToString() + "_out.pdf", (SaveOptions)options);
11}