Free Support Forum -

Page witdth/height from GetViewInfo are not correct for archives in .NET

Calling GetViewInfo for any archive (that I tested with) always returnes page size 1056x816px.
100 txt files (14.7 KB)

        using (var viewer = new Viewer("100 txt files"))
            var viewOptions = ViewInfoOptions.ForHtmlView();
            var info = viewer.GetViewInfo(viewOptions);
            Console.WriteLine($"page size: {info.Pages.First().Width} x {info.Pages.First().Height} px");
            var options = View.Options.HtmlViewOptions.ForEmbeddedResources("output.html");

Tested with GroupDocs.Viewer version 20.5 for .NET.
Is this the proper (only?) way to determine the render size? Or would it be possible to check the generated html file after conversion?

As an additional question / feature request, is it somehow possible to split up archives into multiple pages? With the provided sample file, you can see that a very long html page will be generated that is not ideal for our purpose.


We’re investigating this issue with ticket ID VIEWERNET-2534. You’ll be notified in case of any update.

We’ve logged a feature request with ID VIEWERNET-2535. You’ll be notified in case of any udpate.

1 Like


As for VIEWERNET-2534. The output you are getting is correct. The page size is predefined for the archives to be 1056x816px. We’re using the same template for rendering all supported archive file types.
VIEWERNET-2535 - We’ll try to implement this feature in some upcoming release (probably in 20.7).

1 Like


Thank you, that’s very appreciated :slightly_smiling_face:

Could this also be fixed please? What’ the sense in returning the template size, as it will grow based on it’s content. :thinking:


We’ll look into the possibility (ticket ID VIEWERNET-2534).

1 Like

The issues you have found earlier (filed as VIEWERNET-2535) have been fixed in this update. This message was posted using Bugs notification tool by atirtahir3


As far as VIEWERNET-2534 is concerned, in order to get the document width/height you have to construct a document with browser or browser engine. Of course, document width and height would depend on the screen size. Sorry for the inconvenience but such a feature couldn’t be implemented.
For example, when you’re calling GetViewInfo, we don’t have an HTML document. Even if we have an HTML document the document itself is only fixed by width and the value is relative (80%).