Class PdfConverters


  • public class PdfConverters
    extends Object
    PDF conversion facade.
    Since:
    8.3.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • isConvertible

        public static boolean isConvertible​(String extension)
        Parameters:
        extension - the file extension of the conversion source (e.g. "png")
        Returns:
        true, if there's a PDF converter for the passed type, false if not.
      • forType

        public static IPdfConverter forType​(String extension)
        Parameters:
        extension - the file extension of the conversion source (e.g. "png")
        Returns:
        the appropriate converter (if there's one) or a fallback (that throws a PdfConversionException), but never null.
      • createUploadPostProcessorInst

        public static IUploadPostProcessor createUploadPostProcessorInst​(PdfConversionParams conversionParams,
                                                                         Function<IXUpload,​IXUpload> notProcessableHandler,
                                                                         Consumer<String> protocolEntryHandler)
        Parameters:
        conversionParams - parameters for the PDF conversion (e.g. the target page format), may be PdfConversionParams.EMPTY but not null
        notProcessableHandler - function to handle uploads that are not processable, may be null for noop behaviour
        protocolEntryHandler - processor for protocol entries created during the conversion, must not be null
        Returns:
        a new IUploadPostProcessor instance to be used for PDF conversion of uploaded files.