Class Renditions

java.lang.Object
com.saperion.connector.renditions.Renditions

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

    • create

      public static List<Rendition> create(String originalFilename, TargetFormat target, WrappedFile... files) throws 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:
      FileNotFoundException - file was not found
    • create

      public static List<Rendition> create(String originalFilename, TargetFormat target, WrappedFile file) throws 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:
      FileNotFoundException - if the file was not found
    • transformFileName

      public static String transformFileName(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 String transformFileName(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