com.groupdocs.viewer.converter.options

Class EmailOptions



  • public class EmailOptions
    extends Object

    The Email documents rendering options.

    • Constructor Detail

      • EmailOptions

        public EmailOptions()

        Initializes new instance of EmailOptions class

    • Method Detail

      • getPageSize

        public int getPageSize()

        The size of the output page.

        Returns:
        The size of the output page.
      • setEncoding

        public void setEncoding(Charset value)

        The message encoding.

        Example:
        The following example demonstrates how to set Encoding of email document when rendering as an image.

         ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler();
         HtmlOptions options = new HtmlOptions();
         options.getEmailOptions().setEncoding(Charset.forName(StandardCharsets.UTF_8.name()));
        
         String guid = "C:\storage\email.msg";
         List<PageHtml> pages = htmlHandler.getPages(guid, options);
         

        Parameters:
        value -
      • setFieldLabels

        public void setFieldLabels(Map<String,String> fieldLabels)

        The message field labels.

        Example:
        The following example demonstrates how to change default value of the field labels.

         ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler();
         HtmlOptions options = new HtmlOptions();
         options.getEmailOptions().getFieldLabels().put(EmailField.From, "Sender");
         options.getEmailOptions().getFieldLabels().put(EmailField.To, "Receiver");
         options.getEmailOptions().getFieldLabels().put(EmailField.Sent, "Date");
         options.getEmailOptions().getFieldLabels().put(EmailField.Subject, "Topic");
        
         String guid = "C:\storage\email.msg";
         List<PageHtml> pages = htmlHandler.getPages(guid, options);
         

        Parameters:
        fieldLabels - The message field labels.
      • setPageSize

        public void setPageSize(int value)

        The size of the output page.

        Parameters:
        value - The size of the output page.