Rendering Task Sheet View
Aspose.Tasks for Java supports rendering project tasks to a variety of formats, such as PDF. Task sheets can be rendered using Aspose.Tasks’ PresentationFormat.
Rendering Task Sheet View The code snippet in this article reads a source MPP file that has a number of tasks with assigned resources and renders these to output PDF using the following steps:
- Create an instance of the Project Reader.
- Read the source MPP file.
- Initiate the SaveOptions object with required timescale settings.
- Set the presentation format to TaskSheet.
- Render the project to PDF output.
1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(RenderTaskSheet.class);
4
5Project project = new Project(dataDir + "NewProductDev.mpp");
6SaveOptions options = new PdfSaveOptions();
7options.setPresentationFormat(PresentationFormat.TaskSheet);
8// See the result attached
9project.save(dataDir + "taskSheet.pdf", options);