Package org.ghost4j.converter
Class PDFConverter
- java.lang.Object
-
- org.ghost4j.AbstractComponent
-
- org.ghost4j.AbstractRemoteComponent
-
- org.ghost4j.converter.AbstractRemoteConverter
-
- org.ghost4j.converter.PDFConverter
-
- All Implemented Interfaces:
Component
,Converter
,RemoteConverter
public class PDFConverter extends AbstractRemoteConverter
PDF converter.
-
-
Field Summary
Fields Modifier and Type Field Description private int
autoRotatePages
Define auto rotate pages behaviour.private java.lang.String
compatibilityLevel
Define PDF version compatibility level (default is "1.4").static int
OPTION_AUTOROTATEPAGES_ALL
static int
OPTION_AUTOROTATEPAGES_NONE
static int
OPTION_AUTOROTATEPAGES_OFF
static int
OPTION_AUTOROTATEPAGES_PAGEBYPAGE
static int
OPTION_PDFSETTINGS_DEFAULT
static int
OPTION_PDFSETTINGS_EBOOK
static int
OPTION_PDFSETTINGS_PREPRESS
static int
OPTION_PDFSETTINGS_PRINTER
static int
OPTION_PDFSETTINGS_SCREEN
static int
OPTION_PROCESSCOLORMODEL_CMYK
static int
OPTION_PROCESSCOLORMODEL_GRAY
static int
OPTION_PROCESSCOLORMODEL_RGB
private PaperSize
paperSize
Define standard paper size for the generated PDF file.private int
PDFSettings
Define PDF settings to use.private boolean
PDFX
Enable PDFX generation (default is false).private int
processColorModel
Define process color model.-
Fields inherited from class org.ghost4j.AbstractRemoteComponent
maxProcessCount, processCount
-
Fields inherited from class org.ghost4j.AbstractComponent
supportedDocumentClasses
-
-
Constructor Summary
Constructors Constructor Description PDFConverter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAutoRotatePages()
java.lang.String
getCompatibilityLevel()
PaperSize
getPaperSize()
int
getPDFSettings()
int
getProcessColorModel()
boolean
isPDFX()
static void
main(java.lang.String[] args)
Main method used to start the converter in standalone 'slave mode'.void
run(Document document, java.io.OutputStream outputStream)
Run method called to perform the actual process of the converter.void
setAutoRotatePages(int autoRotatePages)
void
setCompatibilityLevel(java.lang.String compatibilityLevel)
void
setPaperSize(java.lang.String paperSizeName)
void
setPaperSize(PaperSize paperSize)
void
setPDFSettings(int PDFSettings)
void
setPDFX(boolean PDFX)
void
setProcessColorModel(int processColorModel)
-
Methods inherited from class org.ghost4j.converter.AbstractRemoteConverter
convert, remoteConvert, startRemoteConverter
-
Methods inherited from class org.ghost4j.AbstractRemoteComponent
buildJavaFork, getMaxProcessCount, getProcessCount, getRemoteComponent, isStandAloneModeSupported, setMaxProcessCount, startRemoteServer, waitForFreeProcess
-
Methods inherited from class org.ghost4j.AbstractComponent
assertDeviceSupported, assertDocumentSupported, copySettings, extractSettings, isDeviceSupported
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ghost4j.Component
copySettings, extractSettings
-
Methods inherited from interface org.ghost4j.converter.RemoteConverter
setMaxProcessCount
-
-
-
-
Field Detail
-
OPTION_AUTOROTATEPAGES_NONE
public static final int OPTION_AUTOROTATEPAGES_NONE
- See Also:
- Constant Field Values
-
OPTION_AUTOROTATEPAGES_ALL
public static final int OPTION_AUTOROTATEPAGES_ALL
- See Also:
- Constant Field Values
-
OPTION_AUTOROTATEPAGES_PAGEBYPAGE
public static final int OPTION_AUTOROTATEPAGES_PAGEBYPAGE
- See Also:
- Constant Field Values
-
OPTION_AUTOROTATEPAGES_OFF
public static final int OPTION_AUTOROTATEPAGES_OFF
- See Also:
- Constant Field Values
-
OPTION_PROCESSCOLORMODEL_RGB
public static final int OPTION_PROCESSCOLORMODEL_RGB
- See Also:
- Constant Field Values
-
OPTION_PROCESSCOLORMODEL_GRAY
public static final int OPTION_PROCESSCOLORMODEL_GRAY
- See Also:
- Constant Field Values
-
OPTION_PROCESSCOLORMODEL_CMYK
public static final int OPTION_PROCESSCOLORMODEL_CMYK
- See Also:
- Constant Field Values
-
OPTION_PDFSETTINGS_DEFAULT
public static final int OPTION_PDFSETTINGS_DEFAULT
- See Also:
- Constant Field Values
-
OPTION_PDFSETTINGS_SCREEN
public static final int OPTION_PDFSETTINGS_SCREEN
- See Also:
- Constant Field Values
-
OPTION_PDFSETTINGS_EBOOK
public static final int OPTION_PDFSETTINGS_EBOOK
- See Also:
- Constant Field Values
-
OPTION_PDFSETTINGS_PRINTER
public static final int OPTION_PDFSETTINGS_PRINTER
- See Also:
- Constant Field Values
-
OPTION_PDFSETTINGS_PREPRESS
public static final int OPTION_PDFSETTINGS_PREPRESS
- See Also:
- Constant Field Values
-
autoRotatePages
private int autoRotatePages
Define auto rotate pages behaviour. Can be OPTION_AUTOROTATEPAGES_NONE, OPTION_AUTOROTATEPAGES_ALL, OPTION_AUTOROTATEPAGES_PAGEBYPAGE or OPTION_AUTOROTATEPAGES_OFF (default).
-
processColorModel
private int processColorModel
Define process color model. Can be OPTION_PROCESSCOLORMODEL_RGB, OPTION_PROCESSCOLORMODEL_GRAY or OPTION_PROCESSCOLORMODEL_CMYK.
-
PDFSettings
private int PDFSettings
Define PDF settings to use. Can be OPTION_PDFSETTINGS_DEFAULT, OPTION_PDFSETTINGS_SCREEN, OPTION_PDFSETTINGS_EBOOK, OPTION_PDFSETTINGS_PRINTER or OPTION_PDFSETTINGS_PREPRESS.
-
compatibilityLevel
private java.lang.String compatibilityLevel
Define PDF version compatibility level (default is "1.4").
-
PDFX
private boolean PDFX
Enable PDFX generation (default is false).
-
paperSize
private PaperSize paperSize
Define standard paper size for the generated PDF file. This parameter is ignored if a paper size is provided in the input file. Default value is "letter".
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws ConverterException
Main method used to start the converter in standalone 'slave mode'.- Parameters:
args
-- Throws:
ConverterException
-
run
public void run(Document document, java.io.OutputStream outputStream) throws java.io.IOException, ConverterException, DocumentException
Run method called to perform the actual process of the converter.- Specified by:
run
in classAbstractRemoteConverter
- Parameters:
document
-outputStream
-- Throws:
java.io.IOException
ConverterException
DocumentException
-
getAutoRotatePages
public int getAutoRotatePages()
-
setAutoRotatePages
public void setAutoRotatePages(int autoRotatePages)
-
getProcessColorModel
public int getProcessColorModel()
-
setProcessColorModel
public void setProcessColorModel(int processColorModel)
-
getCompatibilityLevel
public java.lang.String getCompatibilityLevel()
-
setCompatibilityLevel
public void setCompatibilityLevel(java.lang.String compatibilityLevel)
-
getPDFSettings
public int getPDFSettings()
-
setPDFSettings
public void setPDFSettings(int PDFSettings)
-
isPDFX
public boolean isPDFX()
-
setPDFX
public void setPDFX(boolean PDFX)
-
getPaperSize
public PaperSize getPaperSize()
-
setPaperSize
public void setPaperSize(PaperSize paperSize)
-
setPaperSize
public void setPaperSize(java.lang.String paperSizeName)
-
-