public class TransformationUtils
extends java.lang.Object
Constructor and Description |
---|
TransformationUtils() |
Modifier and Type | Method and Description |
---|---|
static TransformationOptions |
createTransformationOptions(java.lang.Integer pageNum) |
static TransformationOptions |
createTransformationOptions(java.lang.Integer firstPageNum,
java.lang.Integer lastPageNum,
java.lang.Integer docWidth,
java.lang.Integer docHeight,
java.lang.Integer resolution,
java.lang.String imageWidth) |
static java.lang.String |
getMimetypeFileExtension(java.lang.String mimetype)
Gets the file extension that corresponds to the supplied mimetype.
|
static ArtifexTransformationOptions |
processAndValidateTransformationOptionsForGhostscript(TransformationOptions tOptions) |
static ArtifexTransformationOptions |
processAndValidateTransformationOptionsForMuPDF(TransformationOptions tOptions) |
static java.lang.String |
sanitizeMimetype(java.lang.String mimetype) |
public static java.lang.String sanitizeMimetype(java.lang.String mimetype) throws java.lang.RuntimeException
java.lang.RuntimeException
public static java.lang.String getMimetypeFileExtension(java.lang.String mimetype)
mimetype
- that we will use to lookup the corresponding file extension.public static TransformationOptions createTransformationOptions(java.lang.Integer pageNum)
pageNum
- the page to be transformed, optional.public static TransformationOptions createTransformationOptions(java.lang.Integer firstPageNum, java.lang.Integer lastPageNum, java.lang.Integer docWidth, java.lang.Integer docHeight, java.lang.Integer resolution, java.lang.String imageWidth)
firstPageNum
- the first page to be transformedlastPageNum
- the last page to be transformeddocWidth
- the width of the document to be transformeddocHeight
- the height of the document to be transformedresolution
- the resolution to create the image atimageWidth
- the width of the outputted resolutionpublic static ArtifexTransformationOptions processAndValidateTransformationOptionsForGhostscript(TransformationOptions tOptions)
public static ArtifexTransformationOptions processAndValidateTransformationOptionsForMuPDF(TransformationOptions tOptions)