Free Support Forum -

Wrong resolution in HTML ViewInfo for PPTX in .NET

Calling GetViewInfo for any PPTX file does not return the correct resolution.
We want to determine the resolution of the resulting PPTX file with the code below:

using (var viewer = new Viewer(documentPath)
     var info = viewer.GetViewInfo(ViewInfoOptions.ForHtmlView());

But the info.Pages variable holds several pages that all have 960x540 pixels.
When I open one of the HTML files in a browser, it’s shown as 1280x720 pixels.
Are those values wrong, or do I adjust them somehow to get the expected outcome?

I tested with GroupDocs Viewer 21.5.0.
Please see the attached documents and screenshots:
PPTX page (1005.7 KB)

Hi @Clemens_Pestuka

We could reproduce this issue at our end. It’s been logged in our internal issue tracking system with ID VIEWERNET-3321. As there’s any update, you’ll be notified.

1 Like

Hi @Clemens_Pestuka

For now, you can use the following workaround by adding in markup:

<style type='text/css'>

You may set different values of width, height in CSS if it is suitable for your case.


Thank you for the workaround. :+1:
I’ll check with my colleague who is working on the front-end if this is an option for us.

1 Like

Hi @Clemens_Pestuka

You’re welcome!