Adjust time unit

When rendering MS Project documents GroupDocs.Viewer tries to find optimal output size and time unit depending on the project’s overall length. In case you need to set your own page size or time unit, you can set ProjectManagementOptions class properties of corresponding HtmlViewOptionsJpgViewOptionsPngViewOptions or PdfViewOptions class as shown in code samples below. Time unit refers to the smallest unit (days, third of a month or month) used in timescale bar. When the TimeUnit.DAYS is selected, you will get the most detailed view of your tasks. Whereas, when TimeUnit.MONTH is selected, you will get the more general representation of tasks.

The TimeUnit enumeration contains the following members:

The following are the steps to be followed to set time interval:

The following code samples show how to render MS Project document by time intervals.

    try (Viewer viewer = new Viewer("sample.mpp")) {
        HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();