public class PDFToJPGTransformer
extends org.gcube.datatransformation.datatransformationlibrary.programs.Stream2StreamProgram
Program transforming the first page of a pdf to jpeg.
| Constructor and Description |
|---|
PDFToJPGTransformer() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
pdfToAllImages(String outdir,
org.pdfbox.pdmodel.PDDocument document) |
protected static String |
pdfToOneImage(String outFileName,
org.pdfbox.pdmodel.PDDocument document,
int pageNum) |
InputStream |
transformStream(InputStream content,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType sourceContentType,
List<org.gcube.datatransformation.datatransformationlibrary.model.Parameter> programParameters,
org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType) |
transformDataElementpublic InputStream transformStream(InputStream content, org.gcube.datatransformation.datatransformationlibrary.model.ContentType sourceContentType, List<org.gcube.datatransformation.datatransformationlibrary.model.Parameter> programParameters, org.gcube.datatransformation.datatransformationlibrary.model.ContentType targetContentType) throws Exception
transformStream in class org.gcube.datatransformation.datatransformationlibrary.programs.Stream2StreamProgramcontent - The content of the source DataElement.sourceContentType - The ContentType of the source DataElement.programParameters - The parameters of the Program.targetContentType - The ContentType in which the DataElement will be transformed.Exception - If the Program is not capable to transform DataElements.Stream2StreamProgram.transformStream(java.io.InputStream, org.gcube.datatransformation.datatransformationlibrary.model.ContentType, java.util.List, org.gcube.datatransformation.datatransformationlibrary.model.ContentType)protected static String pdfToOneImage(String outFileName, org.pdfbox.pdmodel.PDDocument document, int pageNum) throws Exception
ExceptionCopyright © 2014. All Rights Reserved.