|
Docmosis API 4.5.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.docmosis.document.converter.ConversionInstruction
This class is used to specify various settings for a document to be rendered. Control features include:
Nested Class Summary | |
static class |
ConversionInstruction.OfficeEngineProperties
Properties specifically for the underlying office engine |
Field Summary | |
static int |
PDF_INITIAL_VIEW_DEFAULT
default view with neither outlines or thumbnails |
static int |
PDF_INITIAL_VIEW_OUTLINE
initial view with outline pane visible |
static int |
PDF_INITIAL_VIEW_THUMBNAIL
initial view with thumbnail pane visible |
Constructor Summary | |
ConversionInstruction()
Create a blank conversion instruction. |
|
ConversionInstruction(ConversionInstruction other)
Create a standalone copy of the given conversion instruction. |
Method Summary | |
boolean |
cleanupDataProvider()
Determine if the DataProvider should be cleaned up at the end of the render process. |
boolean |
compressSingleDocument()
Determine whether to compress (zip) the resulting document if only a single format is being used. |
boolean |
equals(Object obj)
|
ConversionFormat[] |
getConversionFormats()
Get the conversion formats specified by this instruction. |
Map |
getConversionProperties(ConversionFormat format)
|
String |
getConverterGroupName()
Get the name of the Converter Group to use to render the document. |
String |
getOutputFileName()
|
String |
getOutputFileNameWithFormats()
Determine the default output file name that will be produced based on: outputFileName conversionFormats compressSingleDocument The effect is to ensure the default outputName has the correct extension based on what will be generated (".zip" for multiple files or compressing single format, otherwise the extension for the type). |
RendererRegistry |
getRendererRegistry()
Get the collection of renderers registry that have been set into this instruction. |
int |
hashCode()
|
boolean |
includesFormat(ConversionFormat format)
Determine if the specified format is included in the conversion formats currently set in this instruction. |
boolean |
isCompressingSingleDocument()
Determine if a single resulting document should be automatically zipped to create a smaller file. |
boolean |
isConvertOnly()
Determine if this instruction is flagged as "convert only" meaning extra processing (such as updating TOC and counting pages) is not done. |
boolean |
producesZippedDocument()
Determines if this instruction produces a zipped result. |
ConversionInstruction |
setCleanupDataProvider(boolean cleanupDataProvider)
Specify whether the data provider should be cleaned up at the end of the render process. |
ConversionInstruction |
setCompressingSingleDocument(boolean compressingSingleDocument)
Specify whether a single resulting document should be automatically zipped to create a smaller file. |
ConversionInstruction |
setConversionFormats(ConversionFormat[] conversionFormats)
Specify the conversion formats for the returned result. |
ConversionInstruction |
setConverterGroupName(String converterGroupName)
Specify the name of the converter pool group to which this task is to be assigned. |
ConversionInstruction |
setConvertOnly(boolean convertOnly)
Specify this instruction is flagged as "convert only" meaning extra processing (such as updating TOC and counting pages) is not done. |
ConversionInstruction |
setOutputFileName(String outputFileName)
Specify the filename for output. |
ConversionInstruction |
setPdfArchiveMode(boolean archiveMode)
Set whether to use PDF archive mode or not. |
ConversionInstruction |
setPdfDisplayTitle(boolean title)
Set whether to display the document title (if available) in the PDF window title bar. |
ConversionInstruction |
setPdfEmbedStandardFonts(boolean embed)
Specifies whether to embed the 14 standard PDF fonts or not. |
ConversionInstruction |
setPdfHideViewerMenubar(boolean hide)
Specifies whether to hide the PDF viewer menubar when the document is active. |
ConversionInstruction |
setPdfHideViewerToolbar(boolean hide)
Specifies whether to hide the PDF viewer toolbar when the document is active. |
ConversionInstruction |
setPdfHideViewerWindowControls(boolean hide)
Specifies whether to hide the PDF viewer controls when the document is active. |
ConversionInstruction |
setPdfImageCompressionQuality(int quality)
Specifies quality of the JPG export. |
ConversionInstruction |
setPdfInitialView(int view)
Specifies how the PDF document should be displayed when opened. |
ConversionInstruction |
setPdfLosslessConversion(boolean lossless)
Specifies if graphics are exported to PDF using a lossless compression eg. |
ConversionInstruction |
setPdfMagnification(int magnification,
int zoom)
Set the magnification and zoom. |
ConversionInstruction |
setPdfOpenInFullScreen(boolean fullScreen)
Set whether to open the PDF in fullscreen mode or not. |
ConversionInstruction |
setPdfPasswordProtect(String password)
Set a password to read-protect a PDF document. |
ConversionInstruction |
setPdfTagged(boolean tagged)
Specify whether the PDF should be tagged. |
ConversionInstruction |
setPdfWatermark(String text)
Set whether to use a watermark or not. |
ConversionInstruction |
setRenderer(Class forClass,
FieldRenderer renderer)
Set a renderer against the given Class for use with this instruction. |
ConversionInstruction |
setRenderer(String name,
FieldRenderer renderer)
Set a renderer with the given name for use with this instruction. |
ConversionInstruction |
setWordPasswordProtect(String password)
Set an encrypted password to protect a Word document. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PDF_INITIAL_VIEW_DEFAULT
public static final int PDF_INITIAL_VIEW_OUTLINE
public static final int PDF_INITIAL_VIEW_THUMBNAIL
Constructor Detail |
public ConversionInstruction()
public ConversionInstruction(ConversionInstruction other)
other
- the instruction to copyMethod Detail |
public String getOutputFileName()
public String getOutputFileNameWithFormats()
public ConversionInstruction setOutputFileName(String outputFileName)
outputFileName
- the name of the file
public boolean isCompressingSingleDocument()
public ConversionFormat[] getConversionFormats()
public ConversionInstruction setWordPasswordProtect(String password)
password
- the password to open the Word document; null removes any
current passwords.
public ConversionInstruction setPdfPasswordProtect(String password)
password
- the password to open the PDF document
public ConversionInstruction setPdfMagnification(int magnification, int zoom) throws IllegalArgumentException
magnification
- the magnification rule to use as follows:
0= Opens with default zoom magnification.
1= Opens magnified to fit the entire page within the window.
2= Opens magnified to fit the entire page width within the window.
3= Opens magnified to fit the entire width of its bounding box within the window (cuts out margins).
4= Opens with the zoom level specified in the zoom property.
The default is 0.zoom
- only applicable if the magnification is 4. Zoom determines
the percentage zoom level.
IllegalArgumentException
public ConversionInstruction setPdfArchiveMode(boolean archiveMode) throws IllegalArgumentException
archiveMode
- true to use PDF archive mode; false otherwise. Default is false.
IllegalArgumentException
public ConversionInstruction setPdfImageCompressionQuality(int quality) throws IllegalArgumentException
quality
- Minimum inclusive value: 1. Represents lowest value that can be used.
The lower the value, the less good is the compression quality and the bigger is be
the file size.
Maximum inclusive value:100. Represents highest value that can be used. The higher
the value, the better is the compression quality and the smaller is the file size.
The default is 90.
IllegalArgumentException
public ConversionInstruction setPdfInitialView(int view) throws IllegalArgumentException
view
- PDF_INITIAL_VIEW_DEFAULT = Select the default viewer mode, neither outlines or thumb nails.
PDF_INITIAL_VIEW_OUTLINE = The document is opened with outline pane opened.
PDF_INITIAL_VIEW_THUMBNAIL = The document is opened with thumb nail pane opened.
The default value is 0.
IllegalArgumentException
- if an invalid view is providedpublic ConversionInstruction setPdfLosslessConversion(boolean lossless)
lossless
- true to use lossless compression; false to use normal
compression; default is false; setting this property to true will
override any calls to setPdfImageCompressionQuality().
public ConversionInstruction setPdfEmbedStandardFonts(boolean embed)
embed
- true to embed standard fonts; false to not do so; default is false.
public ConversionInstruction setPdfWatermark(String text)
text
- the text of the watermark to use. Use null to set no watermark.
Default is null.
public ConversionInstruction setPdfOpenInFullScreen(boolean fullScreen)
fullScreen
- true to open the PDF in full screen mode; false otherwise.
public ConversionInstruction setPdfDisplayTitle(boolean title)
title
- true to display the document title; false to just display the
file name; default is to just display the file name.
public ConversionInstruction setPdfHideViewerMenubar(boolean hide)
hide
- true to hide the view menubar; default is false.
public ConversionInstruction setPdfHideViewerToolbar(boolean hide)
hide
- true to hide the viewer toolbar ; default is false.
public ConversionInstruction setPdfHideViewerWindowControls(boolean hide)
hide
- true to hide the viewer controls; default is false.
public ConversionInstruction setPdfTagged(boolean tagged)
tagged
- if true, the PDF will be tagged.
public Map getConversionProperties(ConversionFormat format)
public boolean compressSingleDocument()
public ConversionInstruction setCompressingSingleDocument(boolean compressingSingleDocument)
compressingSingleDocument
- if true, single documents will be zipped.
public ConversionInstruction setConversionFormats(ConversionFormat[] conversionFormats)
conversionFormats
- the array of formats desired
public String getConverterGroupName()
public ConversionInstruction setConverterGroupName(String converterGroupName)
converterGroupName
- the name of the group.
public boolean cleanupDataProvider()
public ConversionInstruction setCleanupDataProvider(boolean cleanupDataProvider)
cleanupDataProvider
- set to false to disable auto cleanup
public boolean isConvertOnly()
public ConversionInstruction setConvertOnly(boolean convertOnly)
convertOnly
- if true, minimised processing will occur
public ConversionInstruction setRenderer(String name, FieldRenderer renderer)
name
- the name against which the renderer is associatedrenderer
- the renderer
public ConversionInstruction setRenderer(Class forClass, FieldRenderer renderer)
forClass
- the Class against which the renderer is associatedrenderer
- the renderer
public RendererRegistry getRendererRegistry()
public boolean includesFormat(ConversionFormat format)
format
- the format to test
public boolean producesZippedDocument()
public int hashCode()
public boolean equals(Object obj)
|
Docmosis API 4.5.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |