Adjust page size

GroupDocs.Viewer allows setting output page size for rendering Email messages into HTML, PDF, and images. To enable this feature, the PageSize property of the EmailOptions class is used. The following are the pages sizes that are supported and provided in PageSize enumeration:

  • Unspecified - The default, unspecified page size
  • Letter - The size of the Letter page in points is 792 × 612
  • Ledger - The size of the Ledger page in points is 1224 × 792
  • A0 - The size of the A0 page in points is 3371 × 2384
  • A1 - The size of the A1 page in points is 2384 × 1685
  • A2 - The size of the A2 page in points is 1684 × 1190
  • A3 - The size of the A3 page in points is 1190 × 842
  • A4 - The size of the A4 page in points is 842 × 595

The following are the steps to set size for email message:

            using (Viewer viewer = new Viewer("sample.msg"))
            {
                PdfViewOptions viewOptions = new PdfViewOptions();
                viewOptions.EmailOptions.PageSize = PageSize.A4;
                viewer.View(viewOptions);
            }

More resources

GitHub Examples

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

Free Online App

Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.