com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class PreviewHandler

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable


    public abstract class PreviewHandler
    extends Object
    implements com.aspose.ms.System.IDisposable

    Provides an abstract base class for all preview handlers.

    • Method Detail

      • getUnitOfMeasurement

        public abstract int getUnitOfMeasurement()

        Gets the unit of measurement of the document.

        Returns:
        The unit of measurement of the document.
      • getPages

        public PreviewPage[] getPages()

        Gets a collection of the document pages for which previews can be generated.

        Returns:
        A collection of the document pages for which previews can be generated.
      • getPreviewSupported

        public boolean getPreviewSupported()

        Gets a value indicating whether generating preview images is supported for the document.

        Returns:
        True if previews can be generated for the document; otherwise, false.
      • getPageImage

        public PreviewImageData[] getPageImage(int pageIndex)

        Creates preview images for the specified page.

        Parameters:
        pageIndex - The zero-based index of the page to preview.
        Returns:
        A collection of preview images.
      • getPageImage

        public PreviewImageData[] getPageImage(int pageIndex,
                                      int resolution)

        Creates preview images for the specified page.

        Parameters:
        pageIndex - The zero-based index of the page to preview.
        resolution - The resolution for generated images.
        Returns:
        A collection of preview images.
      • dispose

        public void dispose()

        Disposes the current instance.

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable
      • dispose

        protected void dispose(boolean disposing)

        Disposes the current instance.

        Parameters:
        disposing - True to release both managed and unmanaged resources; false to release only unmanaged resources.
      • extractPreviewPages

        protected abstract PreviewPage[] extractPreviewPages()

        Extracts the collection of preview pages from a particular format.

        Returns:
        The collection of preview pages.
      • createPreviews

        protected abstract PreviewImageData[] createPreviews(int pageIndex,
                                        int resolution)

        Creates preview images for the specified page.

        Parameters:
        pageIndex - The zero-based index of the page to preview.
        resolution - The resolution for generated images.
        Returns:
        The collection of preview images.