Package com.compdfkit.conversion
Class CPDFConverter
-
- All Implemented Interfaces:
public class CPDFConverter
This is the base class for all conversion operations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
CPDFConverter.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Boolean
isConverting
public final static CPDFConverter.Companion
Companion
-
Method Summary
Modifier and Type Method Description final Boolean
isConverting()
Returns a Boolean value indicating whether a conversion operation is in progress. final Integer
getPagesCount(String userPwd)
Get the pages count of document. ConvertError
convert(String outputDir, String outputFilenameNoSuffix, CPDFConvertOptions options, IntArray pageArrays, Function1<Long, Unit> onHandle, Function2<Integer, Integer, Unit> onProgress, Function2<ConvertError, String, Unit> onPost)
Starts the conversion. ConvertError
cancle()
Cancels the conversion task. -
-
Method Detail
-
isConverting
final Boolean isConverting()
Returns a Boolean value indicating whether a conversion operation is in progress.
-
getPagesCount
final Integer getPagesCount(String userPwd)
Get the pages count of document.
- Parameters:
userPwd
- document password
-
convert
ConvertError convert(String outputDir, String outputFilenameNoSuffix, CPDFConvertOptions options, IntArray pageArrays, Function1<Long, Unit> onHandle, Function2<Integer, Integer, Unit> onProgress, Function2<ConvertError, String, Unit> onPost)
Starts the conversion.
- Parameters:
outputDir
- output pathoutputFilenameNoSuffix
- The filename of the output file, the default pass "" adopts the built-in naming rulesoptions
- The derived class parameter of the specified conversion CPDFConvertOptionspageArrays
- Array of page numbers, such as 1,2,…,5onHandle
- Task start callback functiononProgress
- Task in progress callback functiononPost
- Task end callback function
-
cancle
ConvertError cancle()
Cancels the conversion task.
-
-
-
-