Free Support Forum -

Render email file with images programmatically in .NET

Hi usman, I am using GroupDocs.Viewer(version- and runtime version - v2.0.50727,
while uploading email having large image embedded in it along with text , it is not rendering whole image , it is getting cropped.
tried uploading same email in
Issue is coming there too.

This Topic is created by usman.aziz using Email to Topic tool.


Please share with us the problematic email file so that we can investigate the issue at our end. (115.9 KB)

Please find attached zipped problematic email file.

1 Like


We are able to reproduce your reported issue at our end. For further investigation, we have logged this behavior into our internal Issue Tracking System as VIEWERNET-2022. We shall get back to you as soon as we have any updates for you.

As a workaround, you can set a bigger page size when rendering such documents using EmailOptions.PageSize property as shown in the following code samples:

Using v19.8 or higher

using (Viewer viewer = new Viewer("simple-email.msg"))
    PngViewOptions options = new PngViewOptions("page-{0}.png");
    options.EmailOptions.PageSize = PageSize.A2;

Using a version older than v19.8

ViewerImageHandler handler = new ViewerImageHandler();
imageOptions = new ImageOptions(); 
// set output page size
imageOptions.EmailOptions.PageSize = PageSize.A2; 
List<PageImage> pages = handler.GetPages("simple-email.msg", imageOptions);

Note: To use the EmailOptions.PageSize property you will have to upgrade to GroupDocs.Viewer for .NET 18.5 or a higher version.

I have already tried pagesize property, we are using 16.1.1 licensed version for groupdocs viewer.
In this version ,we are not getting pagesize property for email options.
Is there any workaround to do in this version only.


I am afraid that the only possible workaround is to use EmailOptions.PageSize property which is supported by GroupDocs.Viewer for .NET 18.5 and the higher versions. Therefore, we would recommend you to please upgrade the API version.

Ok, thanks for the update.


You’re welcome.

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