com.groupdocs.viewer.handler

Class ViewerImageHandler

    • Constructor Detail

      • ViewerImageHandler

        public ViewerImageHandler()

        Initializes a new instance of the ViewerImageHandler class.

      • ViewerImageHandler

        public ViewerImageHandler(IFileStorage fileStorage)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        fileStorage - The file storage.
      • ViewerImageHandler

        @Deprecated
        public ViewerImageHandler(IFileStorage fileStorage,
                                     com.groupdocs.foundation.utils.CultureInfo cultureInfo)
        Deprecated. 

        Initializes a new instance of the ViewerImageHandler class.

        Deprecated:
        This constructor is obsolete and will be removed after v19.10.

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

        public ViewerImageHandler(ViewerConfig viewerConfig)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
      • ViewerImageHandler

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

        Initializes a new instance of the ViewerImageHandler class.

        Deprecated:
        This constructor is obsolete and will be removed after v19.10.

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

        public ViewerImageHandler(ViewerConfig viewerConfig,
                          IFileStorage fileStorage)

        Initializes a new instance of the ViewerImageHandler class.

        Parameters:
        viewerConfig - The viewer configuration.
        fileStorage - The file storage.
      • ViewerImageHandler

        @Deprecated
        public ViewerImageHandler(ViewerConfig viewerConfig,
                                     IFileStorage fileStorage,
                                     com.groupdocs.foundation.utils.CultureInfo cultureInfo)
        Deprecated. 

        Initializes a new instance of the ViewerImageHandler class.

        Deprecated:
        This constructor is obsolete and will be removed after v19.10.

        Parameters:
        viewerConfig - The viewer configuration.
        fileStorage - The file storage.
        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

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

        Initializes a new instance of the ViewerImageHandler class.

        Deprecated:
        This constructor is obsolete and will be removed after v19.10.

        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

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

        Initializes a new instance of the ViewerImageHandler class.

        Deprecated:
        This constructor is obsolete and will be removed after v19.10.

        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.
    • Method Detail

      • getPages

        public List<PageImage> getPages(AttachmentBase attachment)
                                 throws Exception

        Get list of pages representations of the attachment using render options.

        Parameters:
        attachment - The attachment descriptor.
        Returns:
        List of converted pages.
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(AttachmentBase attachment,
                               ImageOptions imageOptions)
                                 throws Exception

        Get list of pages representations of the attachment using render options.

        Parameters:
        attachment - The attachment descriptor.
        imageOptions - The image options.
        Returns:
        List of converted pages.
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(InputStream fileStream)
                                 throws Exception

        Get list of pages HTML representations.

        Parameters:
        fileStream - The file stream.
        Returns:
        List of converted pages
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(InputStream fileStream,
                               AttachmentBase attachment)
                                 throws Exception

        Get list of pages representations from Stream using file name and render options.

        Parameters:
        fileStream - The file stream.
        attachment - The attachment descriptor.
        Returns:
        List of converted pages
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(InputStream fileStream,
                               AttachmentBase attachment,
                               ImageOptions imageOptions)
                                 throws Exception

        Get list of pages representations from Stream using file name and render options.

        Parameters:
        fileStream - The file stream.
        attachment - The attachment descriptor.
        imageOptions - The image options.
        Returns:
        List of converted pages
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(InputStream fileStream,
                               ImageOptions imageOptions)
                                 throws Exception

        Get list of pages HTML representations.

        Parameters:
        fileStream - The file stream.
        imageOptions - The image options.
        Returns:
        List of converted pages
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(InputStream fileStream,
                               String fileName)
                                 throws Exception

        Get list of pages HTML representations.

        Parameters:
        fileStream - The file stream.
        fileName - The file name.
        Returns:
        List of converted pages
        Throws:
        Exception - if any.
      • getPages

        public List<PageImage> getPages(InputStream fileStream,
                               String fileName,
                               ImageOptions imageOptions)
                                 throws Exception

        Get list of pages HTML representations.

        Parameters:
        fileStream - The file stream.
        fileName - The file name.
        imageOptions - The image options.
        Returns:
        List of converted pages
        Throws:
        Exception - if any.
      • getPages

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

        Get list of pages representations from guid using render options.

        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:
        List of converted pages
        Throws:
        Exception
      • getPages

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

        Get list of pages representations from guid using render options.

        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.
        imageOptions - The image options.
        Returns:
        List of converted pages
        Throws:
        Exception
      • getPages

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

        Get list of pages representations from uri using render options.

        Parameters:
        uri - The URI.
        Returns:
        List of converted pages
        Throws:
        Exception - if any.
      • getPages

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

        Get list of pages representations from uri using render options.

        Parameters:
        uri - The URI.
        imageOptions - The image options.
        Returns:
        List of converted pages
        Throws:
        Exception - if any.
      • getPrintableHtml

        public PrintableHtmlContainer getPrintableHtml(String guid)
                                                throws Exception

        Get document HTML for printing.

        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:
        The document HTML for printing.
        Throws:
        Exception
      • getPrintableHtml

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

        Get document HTML for print.

        Example:
        The following example demonstrates how to get printable HTML of the document.

         ViewerConfig config = new ViewerConfig();
         ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
         String guid = "C:\storage\document.doc";
         PrintableHtmlOptions options = new PrintableHtmlOptions(guid);
        
         PrintableHtmlContainer container = htmlHandler.getPrintableHtml(options);
         

        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 printable HTML options.
        Returns:
        The document HTML for printing.
        Throws:
        Exception
      • getTransformationOptions

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

        Gets transformation options

        Parameters:
        convertOptions - The convert options.
        Returns:
        The transformation options.