com.groupdocs.viewer.handler

Class ViewerImageHandler



  • public class ViewerImageHandler
    extends ViewerHandler<PageImage>

    Handler for rendering document as Image.

    Version:
    17.5.0
    Author:
    GroupDocs.Viewer Team
    • Constructor Detail

      • ViewerImageHandler

        public ViewerImageHandler()

        Initializes a new instance of the ViewerImageHandler class.

      • ViewerImageHandler

        public ViewerImageHandler(ViewerConfig viewerConfig)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
      • ViewerImageHandler

        public ViewerImageHandler(ViewerConfig viewerConfig,
                          com.groupdocs.foundation.utils.CultureInfo cultureInfo)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
        cultureInfo - The viewer culture. Supported cultures are en-Us, pt-PT and ru-RU.
      • ViewerImageHandler

        public ViewerImageHandler(ViewerConfig viewerConfig,
                          IInputDataHandler inputDataHandler)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
        inputDataHandler - The input data handler.
      • ViewerImageHandler

        public ViewerImageHandler(ViewerConfig viewerConfig,
                          IInputDataHandler inputDataHandler,
                          com.groupdocs.foundation.utils.CultureInfo cultureInfo)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
        inputDataHandler - The input data handler.
        cultureInfo - The viewer culture. Supported cultures are en-Us, pt-PT and ru-RU.
      • ViewerImageHandler

        public ViewerImageHandler(ViewerConfig viewerConfig,
                          IInputDataHandler inputDataHandler,
                          ICacheDataHandler cacheDataHandler)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
        inputDataHandler - The input data handler.
        cacheDataHandler - The cache data handler.
      • ViewerImageHandler

        public ViewerImageHandler(ViewerConfig viewerConfig,
                          IInputDataHandler inputDataHandler,
                          ICacheDataHandler cacheDataHandler,
                          com.groupdocs.foundation.utils.CultureInfo cultureInfo)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
        inputDataHandler - The input data handler.
        cacheDataHandler - The cache data handler.
        cultureInfo - The viewer culture. Supported cultures are en-Us, pt-PT and ru-RU.
      • ViewerImageHandler

        public ViewerImageHandler(ViewerConfig viewerConfig,
                          IInputDataHandler inputDataHandler,
                          ICacheDataHandler cacheDataHandler,
                          IFileDataStore fileDataStore)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
        inputDataHandler - The input data handler.
        cacheDataHandler - The cache data handler.
        fileDataStore - The file data store.
      • ViewerImageHandler

        public ViewerImageHandler(ViewerConfig viewerConfig,
                          IInputDataHandler inputDataHandler,
                          ICacheDataHandler cacheDataHandler,
                          IFileDataStore fileDataStore,
                          com.groupdocs.foundation.utils.CultureInfo cultureInfo)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
        inputDataHandler - The input data handler.
        cacheDataHandler - The cache data handler.
        fileDataStore - The file data store.
        cultureInfo - The viewer culture.
    • Method Detail

      • getPages

        public List<PageImage> getPages(String guid)
                                 throws Exception

        Get list of pages image representations.

        The following example demonstrates how to get the list of pages.
        Parameters:
        guid - The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txt.
        Returns:
        System.Collections.Generic.List<GroupDocs.Viewer.Domain.Image.PageImage>.
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(String guid,
                               ImageOptions imageOptions)
                                 throws Exception

        Get list of pages image representations.

        The following example demonstrates how to get image representations of the second page.
        Parameters:
        guid - a String object.
        imageOptions - a ImageOptions object.
        Returns:
        a java$util$List object.
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(URI uri)
                                 throws Exception

        Get list of pages image representations.

        Parameters:
        uri - a URI object.
        Returns:
        a java$util$List object.
        Throws:
        Exception - if any.
      • getPrintableHtml

        public PrintableHtmlContainer getPrintableHtml(String guid,
                                              PrintableHtmlOptions printableHtmlOptions)
                                                throws Exception

        Get document HTML for print.

        Gets the printable HTML.

        The following example demonstrates how to get printable HTML of the document.
        Specified by:
        getPrintableHtml in class ViewerHandler<PageImage>
        Parameters:
        guid - The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txt
        printableHtmlOptions - The printableHtmlOptions.
        Returns:
        GroupDocs.Viewer.Domain.Responses.PrintableHtmlContainer.
        Throws:
        Exception - if any.
      • getPrintableHtml

        public PrintableHtmlContainer getPrintableHtml(String guid)
                                                throws Exception

        Get document HTML for print.

        Gets the printable HTML.

        Specified by:
        getPrintableHtml in class ViewerHandler<PageImage>
        Parameters:
        guid - The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txt
        Returns:
        PrintableHtmlContainer.
        Throws:
        Exception - if any.
      • resolveConverter

        public com.groupdocs.viewer.converter.Converter<PageImage> resolveConverter(com.groupdocs.viewer.domain.options.ConvertOptions convertOptions)
      • performTransformations

        public void performTransformations(com.aspose.ms.System.Collections.Generic.List<PageImage> pages,
                                  com.groupdocs.viewer.helper.transformation.options.TransformationOptions transformationOptions)
      • getTransformationOptions

        public com.groupdocs.viewer.helper.transformation.options.TransformationOptions getTransformationOptions(com.groupdocs.viewer.domain.options.ConvertOptions convertOptions)