Rendering Project Data on Predefined Page sizes
Contents
[
Hide
Show
]Aspose.Tasks for Java 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 enumerator 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.
1String file = "RenderMe.mpp";
2Project project = new Project(file);
3//Render the project to A3 size
4PdfSaveOptions options = new PdfSaveOptions();
5options.setPresentationFormat(PresentationFormat.GanttChart);
6options.setFitContent(true);
7options.setPageSize(PageSize.A3);
8String resFile = "result_" + "Gantt chart" + "_" + PageSize.A3 + ".pdf";
9project.save(resFile, options);