001/* 002 * Copyright 2014 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.flipbook; 017 018import java.io.File; 019import java.io.IOException; 020import java.util.List; 021 022/** 023 * Converts a document file to PNG images, one image per page. 024 * The document images file name must begin with "page". 025 */ 026public interface Document2ImagesConvertorPolicy 027{ 028 /** 029 * Get the list of mime types the convertor can convert 030 * @return The list of supported mime-types 031 */ 032 public List<String> getSupportedMimeTypes(); 033 034 /** 035 * Convert the given document file to PNG images, one image per page. 036 * @param documentFile the document file to convert. 037 * @param folder the destination folder. 038 * @throws IOException if an I/O error occurs. 039 * @throws FlipbookException if a document error occurs. 040 */ 041 public void convert(File documentFile, File folder) throws IOException, FlipbookException; 042 043}