The ITimeRestriction interface provides the option to set the period of time during which the presentation will be available to users. This interface can be obtained using the IProtectionSettings.TimeRestriction property.

Table 1. Properties

PropertyValue TypeAccessDefault valueProperty description
StartDateDateRead/WriteEmptyThe presentation will be available from the specified date.
EndDateDateRead/WriteEmptyThe presentation will be available until the specified date.

If both parameters are specified, the presentation will be available during the specified time range.

If none of the parameters are specified, the presentation will be displayed with no time restrictions.

Table 2. Methods

MethodDescription
void Reset()

C# - set time restriction

var timeRestriction = converter.Settings.Protection.TimeRestriction;
timeRestriction.StartDate = new DateTime(2020, 3, 17);
timeRestriction.EndDate = new DateTime(2020, 4, 12);
converter.GenerateHtml5Presentation("c:\\presentation\\index.html");
C#