Configure count of characters per row and rows per page to render

When processing text files you can adjust page parameters like max characters per line and max lines per page with MaxCharsPerRow and MaxRowsPerPage options that have been added in v21.6.

using (Viewer viewer = new Viewer("sample.txt"))
    HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
    viewOptions.TextOptions.MaxCharsPerRow = 50; // Default value is 85
    viewOptions.TextOptions.MaxRowsPerPage = 30; // Default value is 55


The following screenshot shows the difference when setting MaxRowsPerPage=30.

Comparing output of default and adjusted value of MaxRowsPerPage parameter

More resources

View Text Files Online

Along with full-featured .NET library we provide simple but powerful free online Apps. View Text and other files online with GroupDocs Viewer App.

GitHub Examples

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