Package org.ametys.plugins.flipbook
Class Document2ImagesConvertor
java.lang.Object
org.ametys.plugins.flipbook.Document2ImagesConvertor
- All Implemented Interfaces:
Initializable
,Component
,Serviceable
public class Document2ImagesConvertor
extends Object
implements Component, Serviceable, Initializable
Converts a document file to PNG images, one image per page.
The document images file name must begin with "page".
This component just delegates its behavior to the chosen
This component just delegates its behavior to the chosen
Document2ImagesConvertorPolicy
in configuration flipbook.convertor
-
Field Summary
Modifier and TypeFieldDescriptionprotected Document2ImagesConvertorPolicy
TheDocument2ImagesConvertorPolicy
chosen in global configuration to usestatic final String
The avalon role. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Convert the given document file to PNG images, one image per page.Get the list of mime types the convertor can convertvoid
void
service
(ServiceManager manager)
-
Field Details
-
ROLE
The avalon role. -
_document2ImagesConvertorPolicies
-
_document2ImagesConvertorPolicyInConf
TheDocument2ImagesConvertorPolicy
chosen in global configuration to use
-
-
Constructor Details
-
Document2ImagesConvertor
public Document2ImagesConvertor()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
getSupportedMimeTypes
Get the list of mime types the convertor can convert- Returns:
- The list of supported mime-types
-
convert
Convert the given document file to PNG images, one image per page.- Parameters:
documentFile
- the document file to convert.folder
- the destination folder.- Throws:
IOException
- if an I/O error occurs.FlipbookException
- if a document error occurs.
-