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 intautoRotatePagesDefine auto rotate pages behaviour.private java.lang.StringcompatibilityLevelDefine PDF version compatibility level (default is "1.4").static intOPTION_AUTOROTATEPAGES_ALLstatic intOPTION_AUTOROTATEPAGES_NONEstatic intOPTION_AUTOROTATEPAGES_OFFstatic intOPTION_AUTOROTATEPAGES_PAGEBYPAGEstatic intOPTION_PDFSETTINGS_DEFAULTstatic intOPTION_PDFSETTINGS_EBOOKstatic intOPTION_PDFSETTINGS_PREPRESSstatic intOPTION_PDFSETTINGS_PRINTERstatic intOPTION_PDFSETTINGS_SCREENstatic intOPTION_PROCESSCOLORMODEL_CMYKstatic intOPTION_PROCESSCOLORMODEL_GRAYstatic intOPTION_PROCESSCOLORMODEL_RGBprivate PaperSizepaperSizeDefine standard paper size for the generated PDF file.private intPDFSettingsDefine PDF settings to use.private booleanPDFXEnable PDFX generation (default is false).private intprocessColorModelDefine 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 intgetAutoRotatePages()java.lang.StringgetCompatibilityLevel()PaperSizegetPaperSize()intgetPDFSettings()intgetProcessColorModel()booleanisPDFX()static voidmain(java.lang.String[] args)Main method used to start the converter in standalone 'slave mode'.voidrun(Document document, java.io.OutputStream outputStream)Run method called to perform the actual process of the converter.voidsetAutoRotatePages(int autoRotatePages)voidsetCompatibilityLevel(java.lang.String compatibilityLevel)voidsetPaperSize(java.lang.String paperSizeName)voidsetPaperSize(PaperSize paperSize)voidsetPDFSettings(int PDFSettings)voidsetPDFX(boolean PDFX)voidsetProcessColorModel(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 ConverterExceptionMain 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:
runin classAbstractRemoteConverter- Parameters:
document-outputStream-- Throws:
java.io.IOExceptionConverterExceptionDocumentException
-
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)
-
-