We are able to observe this behavior where Excel worksheet loses it’s formatting when rendered as multiple pages per sheet. Therefore, we have logged this issue in our Internal Issue Tracking System as VIEWERNET-2052 for further investigation.
We are able to reproduce the exception at our end and it has been logged into our internal Issue Tracking System as VIEWERNET-2051 for further investigation.
The rendering time depends upon multiple factors such as the number of pages, document’s content which can include text, images, tables; the amount of resources that application can use; server’s specifications and so on. It is expected that the larger documents (having large number of pages) may take more time as compared to the smaller ones. Furthermore, we have tried rendering all of your provided documents and they are not taking much time (i.e. Documento388.pdf takes around 37 seconds) except for arquivo (5).docx which contains 1478 pages.
The cache feature of GroupDocs.Viewer API also improves the rendering time when a large document is rendered multiple times. Once the document is rendered, the files are stored in cache and then reused when the same document is rendered again. This way, a considerable time is saved.
Another way to avoid delays when rendering large documents is to render one page at a time. This can be implemented in the front end applications where we can render a fix number (i.e. 5 pages) of pages at start and then instead of rendering all the pages at once, we can render each page when user scroll downs for the next page. For this the API provides the following properties:
HtmlOptions options = new HtmlOptions();
// This will render page number 2 only.
options.PageNumber = 2;
options.CountPagesToRender = 1;
List<PageHtml> Pages = htmlHandler.GetPages("file.docx", options);
For reference, please download this simple console application that we used for testing.