## com.lowagie.text.rtf.document
Class RtfDocumentSettings

    java.lang.Object
      com.lowagie.text.rtf.document.RtfDocumentSettings

    public class RtfDocumentSettings

extends java.lang.Object

The RtfDocumentSettings contains output specific settings. These settings modify how the actual document is then generated and some settings may mean that some RTF readers can't read the document or render it wrongly.

Version:
  $Revision: 1.6 $
Author:
  Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
`private boolean` `alwaysGenerateSoftLinebreaks` Whether to always generate soft linebreaks for \n in Chunks.
`private boolean` `alwaysUseUnicode` Whether to always translate characters past 'z' into unicode representations.
`private int` `dataCacheStyle` How to cache the document during generation.
`private RtfDocument` `document` The RtfDocument this RtfDocumentSettings belongs to.
`private boolean` `outputDebugLineBreaks` Whether to output the line breaks that make the rtf document source more readable.
`private boolean` `outputTableRowDefinitionAfter` Whether to also output the table row definition after the cell content.

Constructor Summary
`RtfDocumentSettings(RtfDocument document)` Constructs a new RtfDocumentSettings object.

Method Summary
`int` `getDataCacheStyle()` Gets the current data cache style.
`boolean` `isAlwaysGenerateSoftLinebreaks()` Gets whether all linebreaks inside Chunks are generated as soft linebreaks.
`boolean` `isAlwaysUseUnicode()` Gets whether all characters bigger than 'z' are represented as unicode.
`boolean` `isOutputDebugLineBreaks()` Gets whether to output the line breaks for increased rtf document readability.
`boolean` `isOutputTableRowDefinitionAfter()` Gets whether the table row definition should also be written after the cell content.
`void` `registerParagraphStyle(RtfParagraphStyle rtfParagraphStyle)` Registers the RtfParagraphStyle for further use in the document.
`void` `setAlwaysGenerateSoftLinebreaks(boolean alwaysGenerateSoftLinebreaks)` Sets whether to always generate soft linebreaks.
`void` `setAlwaysUseUnicode(boolean alwaysUseUnicode)` Sets whether to represent all characters bigger than 'z' as unicode.
`void` `setDataCacheStyle(int dataCacheStyle)` Sets the data cache style.
`void` `setOutputDebugLineBreaks(boolean outputDebugLineBreaks)` Sets whether to output the line breaks for increased rtf document readability.
`void` `setOutputTableRowDefinitionAfter(boolean outputTableRowDefinitionAfter)` Sets whether the table row definition should also be written after the cell content.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### document

    private RtfDocument document

  The RtfDocument this RtfDocumentSettings belongs to.

### outputTableRowDefinitionAfter

    private boolean outputTableRowDefinitionAfter

  Whether to also output the table row definition after the cell content.

### outputDebugLineBreaks

    private boolean outputDebugLineBreaks

  Whether to output the line breaks that make the rtf document source more readable.

### alwaysGenerateSoftLinebreaks

    private boolean alwaysGenerateSoftLinebreaks

  Whether to always generate soft linebreaks for \n in Chunks.

### alwaysUseUnicode

    private boolean alwaysUseUnicode

  Whether to always translate characters past 'z' into unicode representations.

### dataCacheStyle

    private int dataCacheStyle

  How to cache the document during generation. Defaults to RtfDataCache.CACHE_MEMORY;

Constructor Detail

### RtfDocumentSettings

    public RtfDocumentSettings(RtfDocument document)

  Constructs a new RtfDocumentSettings object.

  Parameters:
    `document` - The RtfDocument this RtfDocumentSettings belong to.

Method Detail

### isOutputDebugLineBreaks

    public boolean isOutputDebugLineBreaks()

  Gets whether to output the line breaks for increased rtf document readability.

  Returns:
    Whether to output line breaks.

### setOutputDebugLineBreaks

    public void setOutputDebugLineBreaks(boolean outputDebugLineBreaks)

  Sets whether to output the line breaks for increased rtf document readability. Some line breaks may be added where the rtf specification demands it.

  Parameters:
    `outputDebugLineBreaks` - The outputDebugLineBreaks to set.

### isOutputTableRowDefinitionAfter

    public boolean isOutputTableRowDefinitionAfter()

  Gets whether the table row definition should also be written after the cell content.

  Returns:
    Returns the outputTableRowDefinitionAfter.

### setOutputTableRowDefinitionAfter

    public void setOutputTableRowDefinitionAfter(boolean outputTableRowDefinitionAfter)

  Sets whether the table row definition should also be written after the cell content. This is recommended to be set to `true` if you need Word2000 compatiblity and `false` if the document should be opened in OpenOffice.org Writer.

  Parameters:
    `outputTableRowDefinitionAfter` - The outputTableRowDefinitionAfter to set.

### isAlwaysGenerateSoftLinebreaks

    public boolean isAlwaysGenerateSoftLinebreaks()

  Gets whether all linebreaks inside Chunks are generated as soft linebreaks.

  Returns:
    `True` if soft linebreaks are generated, `false` for hard linebreaks.

### setAlwaysGenerateSoftLinebreaks

    public void setAlwaysGenerateSoftLinebreaks(boolean alwaysGenerateSoftLinebreaks)

  Sets whether to always generate soft linebreaks.

  Parameters:
    `alwaysGenerateSoftLinebreaks` - Whether to always generate soft linebreaks.

### isAlwaysUseUnicode

    public boolean isAlwaysUseUnicode()

  Gets whether all characters bigger than 'z' are represented as unicode.

  Returns:
    `True` if unicode representation is used, `false` otherwise.

### setAlwaysUseUnicode

    public void setAlwaysUseUnicode(boolean alwaysUseUnicode)

  Sets whether to represent all characters bigger than 'z' as unicode.

  Parameters:
    `alwaysUseUnicode` - `True` to use unicode representation, `false` otherwise.

### registerParagraphStyle

    public void registerParagraphStyle(RtfParagraphStyle rtfParagraphStyle)

  Registers the RtfParagraphStyle for further use in the document. This does not need to be done for the default styles in the RtfParagraphStyle object. Those are added automatically.

  Parameters:
    `rtfParagraphStyle` - The RtfParagraphStyle to register.

### setDataCacheStyle

    public void setDataCacheStyle(int dataCacheStyle)

  Sets the data cache style. This controls where the document is cached during generation. Two cache styles are supported:
  - RtfDataCache.CACHE_MEMORY: The document is cached in memory. This is fast, but places a limit on how big the document can get before causing OutOfMemoryExceptions.
  - RtfDataCache.CACHE_DISK: The document is cached on disk. This is slower than the CACHE_MEMORY setting, but the document size is now only constrained by the amount of free disk space.

  Parameters:
    `dataCacheStyle` - The data cache style to set. Valid constants can be found in RtfDataCache.
  See Also:
    `com.lowagie.text.rtf.document.output.output.RtfDataCache.`

### getDataCacheStyle

    public int getDataCacheStyle()

  Gets the current data cache style.

  Returns:
    The current data cache style.