Render project time interval

There is the possibility that you are required to render a part of the MS Project within the specified time interval. In that case, GroupDocs.Viewer allows rendering part of MS Project document according to specified setStartDate(…) and setEndDate(…) properties of ProjectManagementOptions class as shown in code samples below. When only one of these properties is set, rendering starts from the project’s start date or ends on the project’s end date correspondingly.

The following code samples show how to render MS Project document using setStartDate(…) and setEndDate(…).

    try (Viewer viewer = new Viewer("sample.mpp")) {
        HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();
        viewOptions.getProjectManagementOptions().setStartDate(new Date(2008, Calendar.JUNE, 1));
        viewOptions.getProjectManagementOptions().setEndDate(new Date(2008, Calendar.JULY, 1));

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured Java library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.