public class RTF2FOConfig
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static RTF2FOCompatibilityMode |
COMPATIBILITY_MODE_FOP_0_20_5
Deprecated.
Use RTF2FOCompatibilityMode.COMPATIBILITY_MODE_FOP_0_20_5.
|
static RTF2FOCompatibilityMode |
COMPATIBILITY_MODE_W3C
Deprecated.
Use RTF2FOCompatibilityMode.COMPATIBILITY_MODE_W3C.
|
static int |
DATA_ROW_BORDER_POLICY_AUTO
Use this policy to let the XSL-FO render resolve, what border is displayed between 2 rows.
|
static int |
DATA_ROW_BORDER_POLICY_BOTTOM_BORDER
Use this policy to display the bottom border of the field cell between two data rows of a table.
|
static int |
DATA_ROW_BORDER_POLICY_NO_BORDER
Use this policy to avoid any horizontal borders between two data rows of a table.
|
static int |
DATA_ROW_BORDER_POLICY_TOP_BORDER
Use this policy to display the top border of the field cell between two data rows of a table.
|
static int |
HYPHENATION_POLICY_AUTO
Hyphenation properties are applied to the XSL-FO document if hyphenation is enabled in the RTF document.
|
static int |
HYPHENATION_POLICY_DISABLE
No hyphenation properties are converted into the XSL-FO document during conversion.
|
static int |
HYPHENATION_POLICY_FORCE
Hyphenation is always enabled in the XSL-FO document, regardless if it's disabled in RTF.
|
static int |
IMAGE_TREATMENT_EXTERNAL
Use the external image treatment to store images of an RTF into an image-directory.
|
static int |
IMAGE_TREATMENT_FOREIGN_INSTREAM
Use a foreign instream object like
|
static int |
IMAGE_TREATMENT_INSTREAM
Use the instream image treatment to put the image directly into the resulting XSL-FO tree.
|
static int |
IMAGE_TREATMENT_SVG_INSTREAM
Use the SVG instream image treatment to include the image as an SVG foreign instream object.
|
static int |
TRACK_CHANGES_POLICY_CHANGES
Use this policy to show changes in the documents.
|
static int |
TRACK_CHANGES_POLICY_FINAL
Use this policy to show the final document.
|
static int |
TRACK_CHANGES_POLICY_ORIGINAL
Use this policy to show the original document and ignore any changes.
|
Modifier and Type | Method and Description |
---|---|
de.vc.config.Configuration |
buildConfiguration()
Builds an Avalon-Configuration object from this configuration.
|
void |
configure(de.vc.config.Configuration configuration)
Configures this configuration with an Avalon configuration object.
|
RTF2FOConfig |
copy()
Makes a copy of this configuration.
|
static java.lang.String |
dataRowBorderPolicyToString(int policy)
Returns the String representation for the data-row-border-policy property.
|
RTF2FOCompatibilityMode |
getCompatibilityMode()
Gets the compatibility mode.
|
int |
getDataRowBorderPolicy()
Gets the data row border policy.
|
java.lang.String |
getDefaultImageDir()
Gets the default directory where output-images are stored.
|
Measure |
getDefaultTabWidth()
Gets the default tabulator width or null for auto width.
|
java.util.Locale |
getDocumentLanguage()
Gets the locale that is used to format dates and numbers during conversion.
|
double |
getEstimatorXScaling() |
int |
getHyphenationPolicy()
Gets the hyphenation policy.
|
java.lang.String |
getImageHandler() |
int |
getImageTreatment()
Gets the treatment of images.
|
Measure |
getLineHeightFactor()
Gets the line height factor.
|
int |
getPatternImageDPI()
Gets the dots per inch value applied to generated pattern image.
|
java.awt.Color |
getTrackChangesDeletedColor() |
int |
getTrackChangesPolicy() |
java.awt.Color |
getTrackChangesRevisedColor() |
boolean |
isAdjustFooterHeight()
Return true if the footer-height is adjusted.
|
boolean |
isAdjustHeaderHeight()
Return true if the header-height is adjusted.
|
boolean |
isCompatibilityMode(RTF2FOCompatibilityMode mode)
Checks if a given compatibility mode is set.
|
boolean |
isDefaultFontOnRoot()
Returns true if the default font (of the font-mapper) should be set on the fo:root element.
|
boolean |
isEnableBackgroundImage() |
boolean |
isEnableBookmarks()
Returns whether bookmarks are handled by JFO.
|
boolean |
isEnableLanguageSupport()
Returns true if language properties are added to XSL-FO output.
|
boolean |
isEnableLanguageVariant()
Returns true if not just the language code (e.g.
|
boolean |
isEnableTabulators()
Checks if JFO processes tabulators.
|
boolean |
isFixWordCellPaddingBug()
Due to a bug in Microsoft Word top and left paddings of a cell are swapped.
|
boolean |
isFooterOverflowVisible()
If this property is set to true, JFO may produce an output where the footer overflows document's body.
|
boolean |
isForceSymbolBullet()
Determinates, if all bullets of lists are replaced through default bullet of Adobes Symbol font during RTF import.
|
boolean |
isHeaderOverflowVisible()
If this property is set to true, JFO may produce an output where the header overflows document's body.
|
boolean |
isProcessHiddenText()
Checks if JFO processes hidden text.
|
boolean |
isReuseImages()
Return true, if existing images in the image-output folder should be re-used.
|
boolean |
isShowInvalidIncBookmarks()
Return true if invalid/missing bookmarks of included files produce an error message in the output file.
|
boolean |
isShowInvalidIncFiles()
Returns true if an error message is displayed for invalid / missing included files.
|
boolean |
isShowMissingIncFilename()
Gets whether missing filenames of INCLUDETEXT fields generates an error message in the output.
|
boolean |
isStrictHeaderFooterHandling()
Returns true if headers and footers of title and facings are handled strict to the RTF specification.
|
static int |
parseDataRowBorderPolicy(java.lang.String policy)
Returns the constant value for a String representation of the data-row-border-policy.
|
void |
reconfigure(de.vc.config.Configuration configuration)
Re-Configures this configuration with an Avalon configuration object.
|
void |
setAdjustFooterHeight(boolean adjustFooterHeight)
Sets whether the height of footers are adjusted if neccessary.
|
void |
setAdjustHeaderHeight(boolean adjustHeaderHeight)
Sets whether the height of headers are adjusted if neccessary.
|
void |
setCompatibilityMode(RTF2FOCompatibilityMode compatibilityMode)
Sets the compatibility mode.
|
void |
setDataRowBorderPolicy(int dataRowBorderPolicy)
Sets the data row border policy that is used horizontal borders between data rows.
|
void |
setDefaultFontOnRoot(boolean defaultFontOnRoot)
Sets whether the default font is set on the fo:root element.
|
void |
setDefaultImageDir(java.lang.String dir)
Sets the default image Directory.
|
void |
setDefaultTabWidth(Measure defaultTabWidth)
Sets the default tabulator width.
|
void |
setDocumentLanguage(java.util.Locale locale)
Sets the locale that is used to format dates and numbers during conversion.
|
void |
setEnableBackgroundImage(boolean rtfEnableBackgroundImage) |
void |
setEnableBookmarks(boolean enableBookmarks)
Enables or disables handling of bookmarks.
|
void |
setEnableLanguageSupport(boolean enableLanguageSupport)
Sets whether language properties are added to XSL-FO output.
|
void |
setEnableLanguageVariant(boolean enableLanguageVariant) |
void |
setEnableTabulators(boolean enable)
Sets whether JFO processes tabulators or not.
|
void |
setEstimatorXScaling(double estimatorXScaling) |
void |
setFixWordCellPaddingBug(boolean fixWordCellPaddingBug)
Due to a bug in Microsoft Word top and left paddings of a cell are swapped.
|
void |
setFooterOverflowVisible(boolean footerOverflowVisible)
If this property is set to true, JFO may produce an output where the footer overflows document's body.
|
void |
setForceSymbolBullet(boolean rtfForceSymbolBullet)
Sets, if all bullets of lists are replaced through default bullet of Adobes Symbol font during RTF import.
|
void |
setHeaderOverflowVisible(boolean headerOverflowVisible)
If this property is set to true, JFO may produce an output where the header overflows document's body.
|
void |
setHyphenationPolicy(int hyphenationPolicy)
Sets the hyphenation policy.
|
void |
setImageHandler(java.lang.String imageHandler) |
void |
setImageTreatment(int imageTreatment)
Sets the treatment of images.
|
void |
setLineHeightFactor(Measure lineHeightFactor)
Sets the line height factor (stretching).
|
void |
setPatternImageDPI(int patternImageDPI)
Sets the dots per inch value applied to generated pattern image.
|
void |
setProcessHiddenText(boolean processHiddenText)
Set whether JFO processes or ignores text that is marked as hidden.
|
void |
setReuseImages(boolean reuseImages)
Sets whether or not existing images in the image-output folder should be re-used.
|
void |
setShowInvalidIncBookmarks(boolean showInvalidIncBookmarks)
Sets whether invalid/missing bookmarks of included files produce an error message in the output file.
|
void |
setShowInvalidIncFiles(boolean showInvalidIncFiles)
Sets whether invalid / missing included files generates an error message in the output document.
|
void |
setShowMissingIncFilename(boolean showMissingIncFilename)
Sets whether missing filenames in INCLUDETEXT fields generates an error message in the output.
|
void |
setStrictHeaderFooterHandling(boolean strictHeaderFooterHandling)
Sets whether headers and footers of title and facings are handled strict to the RTF specification.
|
void |
setTrackChangesDeletedColor(java.awt.Color trackChangesDeletedColor) |
void |
setTrackChangesPolicy(int trackChangesPolicy) |
void |
setTrackChangesRevisedColor(java.awt.Color trackChangesRevisedColor) |
public static final int IMAGE_TREATMENT_EXTERNAL
public static final int IMAGE_TREATMENT_INSTREAM
URL.setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory)
,
ExtendableURLStreamHandlerFactory
,
Constant Field Valuespublic static final int IMAGE_TREATMENT_SVG_INSTREAM
public static final int IMAGE_TREATMENT_FOREIGN_INSTREAM
public static final RTF2FOCompatibilityMode COMPATIBILITY_MODE_W3C
public static final RTF2FOCompatibilityMode COMPATIBILITY_MODE_FOP_0_20_5
public static final int DATA_ROW_BORDER_POLICY_AUTO
public static final int DATA_ROW_BORDER_POLICY_NO_BORDER
public static final int DATA_ROW_BORDER_POLICY_TOP_BORDER
public static final int DATA_ROW_BORDER_POLICY_BOTTOM_BORDER
public static final int HYPHENATION_POLICY_AUTO
public static final int HYPHENATION_POLICY_FORCE
public static final int HYPHENATION_POLICY_DISABLE
public static final int TRACK_CHANGES_POLICY_ORIGINAL
public static final int TRACK_CHANGES_POLICY_CHANGES
public static final int TRACK_CHANGES_POLICY_FINAL
public RTF2FOConfig copy()
RTFImporter.setConfiguration(RTF2FOConfig c)
public de.vc.config.Configuration buildConfiguration()
public boolean isForceSymbolBullet()
public void setForceSymbolBullet(boolean rtfForceSymbolBullet)
rtfForceSymbolBullet
- true, if force default bullet.public boolean isEnableBackgroundImage()
public void setEnableBackgroundImage(boolean rtfEnableBackgroundImage)
public boolean isEnableTabulators()
false
if tabulators are skipped.public void setEnableTabulators(boolean enable)
enable
- false
to skip tabulators.public Measure getDefaultTabWidth()
public void setDefaultTabWidth(Measure defaultTabWidth)
defaultTabWidth
- Width or null for auto width.public boolean isEnableBookmarks()
public void setEnableBookmarks(boolean enableBookmarks)
enableBookmarks
- Enable bookmarks.public int getImageTreatment()
public boolean isProcessHiddenText()
true
if hidden text is processed.public RTF2FOCompatibilityMode getCompatibilityMode()
public boolean isCompatibilityMode(RTF2FOCompatibilityMode mode)
mode
- RTF2FOCompatibilityModepublic boolean isHeaderOverflowVisible()
public boolean isFooterOverflowVisible()
public boolean isAdjustHeaderHeight()
public boolean isAdjustFooterHeight()
public int getDataRowBorderPolicy()
DATA_ROW_BORDER_POLICY_AUTO
,
DATA_ROW_BORDER_POLICY_BOTTOM_BORDER
,
DATA_ROW_BORDER_POLICY_TOP_BORDER
,
DATA_ROW_BORDER_POLICY_NO_BORDER
public Measure getLineHeightFactor()
public boolean isFixWordCellPaddingBug()
public java.util.Locale getDocumentLanguage()
public boolean isEnableLanguageSupport()
public boolean isEnableLanguageVariant()
public void setCompatibilityMode(RTF2FOCompatibilityMode compatibilityMode)
compatibilityMode
- New mode.RTF2FOCompatibilityMode.W3C
,
RTF2FOCompatibilityMode.FOP_0_20_5
,
RTF2FOCompatibilityMode.XEP_4
,
RTF2FOCompatibilityMode.AXF_3
,
RTF2FOCompatibilityMode.IBEX_3
public void setImageTreatment(int imageTreatment)
imageTreatment
- Treatment.public void setProcessHiddenText(boolean processHiddenText)
processHiddenText
- false
to ignore hidden text.public void setHeaderOverflowVisible(boolean headerOverflowVisible)
headerOverflowVisible
- booleanpublic void setFooterOverflowVisible(boolean footerOverflowVisible)
footerOverflowVisible
- booleanpublic void setAdjustHeaderHeight(boolean adjustHeaderHeight)
adjustHeaderHeight
- true to enable adjustment.public void setAdjustFooterHeight(boolean adjustFooterHeight)
adjustFooterHeight
- true to enable adjustment.public void setDataRowBorderPolicy(int dataRowBorderPolicy)
dataRowBorderPolicy
- Horizontal border policy.DATA_ROW_BORDER_POLICY_AUTO
,
DATA_ROW_BORDER_POLICY_NO_BORDER
,
DATA_ROW_BORDER_POLICY_TOP_BORDER
,
DATA_ROW_BORDER_POLICY_BOTTOM_BORDER
public void setLineHeightFactor(Measure lineHeightFactor)
lineHeightFactor
- Percentage.public boolean isDefaultFontOnRoot()
public void setDefaultFontOnRoot(boolean defaultFontOnRoot)
defaultFontOnRoot
- Use default font.public void setFixWordCellPaddingBug(boolean fixWordCellPaddingBug)
fixWordCellPaddingBug
- true to fix the bug.public void setDocumentLanguage(java.util.Locale locale)
locale
- Locale of RTF document.public void setEnableLanguageSupport(boolean enableLanguageSupport)
enableLanguageSupport
- Enable language support.setHyphenationPolicy(int)
public int getHyphenationPolicy()
HYPHENATION_POLICY_AUTO
,
HYPHENATION_POLICY_FORCE
,
HYPHENATION_POLICY_DISABLE
public int getPatternImageDPI()
public boolean isStrictHeaderFooterHandling()
public double getEstimatorXScaling()
public void setHyphenationPolicy(int hyphenationPolicy)
hyphenationPolicy
- intHYPHENATION_POLICY_AUTO
,
HYPHENATION_POLICY_FORCE
,
HYPHENATION_POLICY_DISABLE
public void setPatternImageDPI(int patternImageDPI)
patternImageDPI
- DPI of generated pattern images.public void setStrictHeaderFooterHandling(boolean strictHeaderFooterHandling)
strictHeaderFooterHandling
- booleanpublic void setEstimatorXScaling(double estimatorXScaling)
public void setEnableLanguageVariant(boolean enableLanguageVariant)
public void reconfigure(de.vc.config.Configuration configuration) throws de.vc.config.ConfigurationException
configuration
- Configurationde.vc.config.ConfigurationException
public void configure(de.vc.config.Configuration configuration) throws de.vc.config.ConfigurationException
configuration
- Configurationde.vc.config.ConfigurationException
public static final java.lang.String dataRowBorderPolicyToString(int policy)
policy
- Policy as int.public static final int parseDataRowBorderPolicy(java.lang.String policy)
policy
- Policy as String.public boolean isReuseImages()
public void setReuseImages(boolean reuseImages)
reuseImages
- true to reuse images.public java.lang.String getDefaultImageDir()
ImportParameters.getImagePath()
public void setDefaultImageDir(java.lang.String dir)
dir
- Directory.ImportParameters.setImagePath(String)
public boolean isShowInvalidIncFiles()
public void setShowInvalidIncFiles(boolean showInvalidIncFiles)
showInvalidIncFiles
- public boolean isShowInvalidIncBookmarks()
public void setShowInvalidIncBookmarks(boolean showInvalidIncBookmarks)
showInvalidIncBookmarks
- public boolean isShowMissingIncFilename()
public void setShowMissingIncFilename(boolean showMissingIncFilename)
showMissingIncFilename
- public int getTrackChangesPolicy()
public void setTrackChangesPolicy(int trackChangesPolicy)
public java.awt.Color getTrackChangesRevisedColor()
public void setTrackChangesRevisedColor(java.awt.Color trackChangesRevisedColor)
public java.awt.Color getTrackChangesDeletedColor()
public void setTrackChangesDeletedColor(java.awt.Color trackChangesDeletedColor)
public java.lang.String getImageHandler()
public void setImageHandler(java.lang.String imageHandler)
© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.