Class Renditions


  • public final class Renditions
    extends java.lang.Object
    Utility class with methods to create and work with renditions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<Rendition> create​(java.lang.String originalFilename, TargetFormat target, WrappedFile file)
      Creates a list of renditions.
      static java.util.List<Rendition> create​(java.lang.String originalFilename, TargetFormat target, WrappedFile... files)
      Creates a list of renditions.
      static java.lang.String transformFileName​(java.lang.String originalFilename, int page, TargetFormat target)
      Transforms the file name by replacing the original extension (if present) with the extension and adding the page number (_pagex).
      static java.lang.String transformFileName​(java.lang.String originalFilename, TargetFormat target)
      Transforms the file name by replacing the original extension (if present) with the extension of the target format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static java.util.List<Rendition> create​(java.lang.String originalFilename,
                                                       TargetFormat target,
                                                       WrappedFile... files)
                                                throws java.io.FileNotFoundException
        Creates a list of renditions.
        Parameters:
        originalFilename - the original filename
        target - the target format
        files - the files that will contain the pages of the rendered document
        Returns:
        the list or renditions
        Throws:
        java.io.FileNotFoundException - file was not found
      • create

        public static java.util.List<Rendition> create​(java.lang.String originalFilename,
                                                       TargetFormat target,
                                                       WrappedFile file)
                                                throws java.io.FileNotFoundException
        Creates a list of renditions.
        Parameters:
        originalFilename - the original filename
        target - the target format
        file - the file that will contain the rendered content
        Returns:
        the list of renditions
        Throws:
        java.io.FileNotFoundException - if the file was not found
      • transformFileName

        public static java.lang.String transformFileName​(java.lang.String originalFilename,
                                                         TargetFormat target)
        Transforms the file name by replacing the original extension (if present) with the extension of the target format.
        Parameters:
        originalFilename - the original filename
        target - the target format
        Returns:
        the transformed name
      • transformFileName

        public static java.lang.String transformFileName​(java.lang.String originalFilename,
                                                         int page,
                                                         TargetFormat target)
        Transforms the file name by replacing the original extension (if present) with the extension and adding the page number (_pagex).
        Parameters:
        originalFilename - the original filename
        page - the page number
        target - the target format
        Returns:
        the transformed name