com.lowagie.text.rtf.document
public class RtfDocumentSettings extends Object
Version: $Id: RtfDocumentSettings.java 3580 2008-08-06 15:52:00Z howard_s $
Field Summary | |
---|---|
boolean | alwaysGenerateSoftLinebreaks
Whether to always generate soft linebreaks for \n in Chunks. |
boolean | alwaysUseUnicode
Whether to always translate characters past 'z' into unicode representations. |
int | dataCacheStyle
How to cache the document during generation. |
RtfDocument | document
The RtfDocument this RtfDocumentSettings belongs to. |
boolean | imagePDFConformance
Whether images should be written in order to mimick the PDF output. |
boolean | imageWrittenAsBinary
Images are written as binary data and not hex encoded.
|
boolean | outputDebugLineBreaks
Whether to output the line breaks that make the rtf document source more readable. |
boolean | outputTableRowDefinitionAfter
Whether to also output the table row definition after the cell content. |
String | protectionHash
Document protection level password hash.
|
int | protectionLevel
Document protection level.
|
boolean | readOnlyRecommended
Document recommended to be opened in read only mode.
|
boolean | writeImageScalingInformation
Whether to write image scaling information. |
String | writereservhash
Document read password hash.
|
Constructor Summary | |
---|---|
RtfDocumentSettings(RtfDocument document)
Constructs a new RtfDocumentSettings object.
|
Method Summary | |
---|---|
int | convertProtectionLevel()
Converts protection level from internal bitmap value to protlevel output value.
|
int | getDataCacheStyle()
Gets the current data cache style.
|
byte[] | getProtectionHashBytes()
Obtain the password has as a byte array.
|
int | getProtectionLevel()
Author: Howard Shank (hgshank@yahoo.com) |
byte[] | getProtectionLevelBytes()
Author: Howard Shank (hgshank@yahoo.com) |
int | getProtectionLevelRaw()
Author: Howard Shank (hgshank@yahoo.com) |
boolean | getReadOnlyRecommended()
Get the RTF flag that recommends if the the document should be opened in read only mode.
|
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 | isDocumentProtected()
Determine if document has protection enabled.
|
boolean | isImagePDFConformance()
Gets the current setting on image PDF conformance.
|
boolean | isImageWrittenAsBinary()
Gets whether images are written as binary data or are hex encoded. |
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.
|
boolean | isWriteImageScalingInformation()
Gets whether to write scaling information for images.
|
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 | setImagePDFConformance(boolean imagePDFConformance)
Sets the image PDF conformance setting. |
void | setImageWrittenAsBinary(boolean imageWrittenAsBinary)
Set whether images are written as binary data or are hex encoded.
|
boolean | setNewPassword(String oldPwd, String newPwd)
Author: Howard Shank (hgshank@yahoo.com) |
void | setOptionsForMSWord2000And97()
Set the options required for RTF documents to display correctly in MS Word 2000
and MS Word 97.
|
void | setOptionsForMSWordForMac()
Set the options required for RTF documents to display correctly in MS Word for Mac.
|
void | setOptionsForMSWordXP()
Set the options required for RTF documents to display correctly in MS Word XP (2002).
|
void | setOptionsForOpenOfficeOrg()
Set the options required for RTF documents to display correctly in OpenOffice.Org
Writer.
|
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.
|
void | setPasswordHash(String pwd)
This function is not intended for general use. |
boolean | setProtection(int level, String pwd)
Author: Howard Shank (hgshank@yahoo.com) |
boolean | setProtectionLevel(int level)
Author: Howard Shank (hgshank@yahoo.com) |
void | setReadOnlyRecommended(boolean value)
Set the RTF flag that recommends the document be opened in read only mode.
|
void | setWriteImageScalingInformation(boolean writeImageScalingInformation)
Sets whether image scaling information should be written. |
boolean | unprotectDocument(String pwd)
Author: Howard Shank (hgshank@yahoo.com) |
Since: 2.1.1
Since: 2.1.1
Since: 2.1.1
Since: 2.1.1
Since: 2.1.1
Parameters: document The RtfDocument this RtfDocumentSettings belong to.
Returns:
0 = Revision protection
1 = Annotation/Comment protection
2 = Form protection
3 = Read only protection
Since: 2.1.1
Returns: The current data cache style.
Returns: The bytes of the password hash as a byte array (byte[])
Since: 2.1.1
Returns: RTF document protection level
Since: 2.1.1
Returns: RTF document protection level as a byte array (byte[])
Since: 2.1.1
Returns: RTF document protection level
Since: 2.1.1
Returns: true if flag is set, false if it is not set
Since: 2.1.1
Returns: True
if soft linebreaks are generated, false
for hard linebreaks.
Returns: True
if unicode representation is used, false
otherwise.
Returns: true if protection is enabled, false if it is not enabled
Since: 2.1.1
Returns: The current image PDF conformance.
true
.
Author: Mark Hall (Mark.Hall@mail.room3b.eu)Returns: True
if images are written as binary data, false
if hex encoded.
Since: 2.1.1
Returns: Whether to output line breaks.
Returns: Returns the outputTableRowDefinitionAfter.
Returns: Whether to write scaling information for images.
Parameters: rtfParagraphStyle The RtfParagraphStyle to register.
Parameters: alwaysGenerateSoftLinebreaks Whether to always generate soft linebreaks.
Parameters: alwaysUseUnicode True
to use unicode representation, false
otherwise.
Parameters: dataCacheStyle The data cache style to set. Valid constants can be found in RtfDataCache.
See Also: RtfDataCache
false
if images should be generated with the Word default DPI setting.
Parameters: imagePDFConformance True
if PDF equivalence is desired, false
for the default Word display.
Parameters: imageWrittenAsBinary True
to write images as binary data, false
for hex encoding.
Since: 2.1.1
Parameters: oldPwd Old password - clear text newPwd New password - clear text
Returns: true if password set, false if password not set
Since: 2.1.1
outputTableRowDefinitionAfter = true
and writeImageScalingInformation = true
.writeImageScalingInformation = true
.writeImageScalingInformation = false
.outputTableRowDefinitionAfter = false
.Parameters: outputDebugLineBreaks The outputDebugLineBreaks to set.
true
if you need Word2000 compatiblity and
false
if the document should be opened in OpenOffice.org Writer.
Parameters: outputTableRowDefinitionAfter The outputTableRowDefinitionAfter to set.
Parameters: pwd Password HASH to set the document password hash to.
Since: 2.1.1
Parameters: level Document protecton level pwd Document password - clear text
Since: 2.1.1
Parameters: level Document protection level
Since: 2.1.1
Parameters: value true if the flag is to be set, false if it is NOT to be set
Since: 2.1.1
true
MS Word 2000, MS Word 97 and Word for Mac.
Parameters: writeImageScalingInformation Whether to write image scaling information.
Parameters: pwd Document password - clear text
Returns: true if document unprotected, false if protection is not removed.
Since: 2.1.1