Class CommandLineConvertor
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.flipbook.commandline.CommandLineConvertor
- All Implemented Interfaces:
Document2ImagesConvertorPolicy
,LogEnabled
public class CommandLineConvertor
extends AbstractLogEnabled
implements Document2ImagesConvertorPolicy
Configurable command-line PDF to PNG convertor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Convert the given document file to PNG images, one image per page.protected String[]
getCommandLine
(String filePath) Get the command line to generate PNG images from the PDF file.Get the list of mime types the convertor can convertMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
CommandLineConvertor
public CommandLineConvertor()
-
-
Method Details
-
convert
Description copied from interface:Document2ImagesConvertorPolicy
Convert the given document file to PNG images, one image per page.- Specified by:
convert
in interfaceDocument2ImagesConvertorPolicy
- Parameters:
pdfFile
- the document file to convert.folder
- the destination folder.- Throws:
IOException
- if an I/O error occurs.FlipbookException
- if a document error occurs.
-
getCommandLine
Get the command line to generate PNG images from the PDF file.- Parameters:
filePath
- the PDF file path.- Returns:
- the command line as an array containing the command to call and its arguments.
-
getSupportedMimeTypes
Description copied from interface:Document2ImagesConvertorPolicy
Get the list of mime types the convertor can convert- Specified by:
getSupportedMimeTypes
in interfaceDocument2ImagesConvertorPolicy
- Returns:
- The list of supported mime-types
-