Rendering Project Data on Predefined Page Sizes

Overview

When exporting Microsoft Project data to visual formats like images or PDF, it’s often necessary to control the physical output size of the rendered document. This is especially important when preparing reports for print, archiving, or sharing across departments.

Aspose.Tasks for .NET provides full control over this via the PageSize enumeration in SaveOptions. You can choose from a variety of standard paper formats, such as:

These settings allow you to precisely tailor the output for large wall charts, compact printouts, or digital documentation.

Supported Views for Rendering

The following views can be rendered using predefined page sizes:

These can be set using the PresentationFormat property in SaveOptions.

Setting Page Size and Rendering

To use a predefined page size:

  1. Create an instance of ImageSaveOptions or PdfSaveOptions.
  2. Set the PageSize property to the desired value.
  3. Set the PresentationFormat to the view you want (e.g., GanttChart, TaskUsage).
  4. Save the file to disk.

Example: Export Project to A1-Sized Gantt Chart Image

 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}

Notes and Recommendations

Summary

Using Aspose.Tasks for .NET, you can render project data to a variety of predefined page sizes, suitable for printing or digital distribution. This feature simplifies document generation and ensures consistent formatting across various output targets.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.