|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.lowagie.text.rtf.document.RtfDocumentSettings
public class RtfDocumentSettings
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.
Constructor Summary | |
---|---|
RtfDocumentSettings(RtfDocument document)
Constructs a new RtfDocumentSettings object. |
Method Summary | |
---|---|
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(java.lang.String oldPwd,
java.lang.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(java.lang.String pwd)
This function is not intended for general use. |
boolean |
setProtection(int level,
java.lang.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(java.lang.String pwd)
Author: Howard Shank (hgshank@yahoo.com) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RtfDocumentSettings(RtfDocument document)
document
- The RtfDocument this RtfDocumentSettings belong to.Method Detail |
---|
public boolean isOutputDebugLineBreaks()
public void setOutputDebugLineBreaks(boolean outputDebugLineBreaks)
outputDebugLineBreaks
- The outputDebugLineBreaks to set.public boolean isOutputTableRowDefinitionAfter()
public void setOutputTableRowDefinitionAfter(boolean outputTableRowDefinitionAfter)
true
if you need Word2000 compatiblity and
false
if the document should be opened in OpenOffice.org Writer.
outputTableRowDefinitionAfter
- The outputTableRowDefinitionAfter to set.public boolean isAlwaysGenerateSoftLinebreaks()
True
if soft linebreaks are generated, false
for hard linebreaks.public void setAlwaysGenerateSoftLinebreaks(boolean alwaysGenerateSoftLinebreaks)
alwaysGenerateSoftLinebreaks
- Whether to always generate soft linebreaks.public boolean isAlwaysUseUnicode()
True
if unicode representation is used, false
otherwise.public void setAlwaysUseUnicode(boolean alwaysUseUnicode)
alwaysUseUnicode
- True
to use unicode representation, false
otherwise.public void registerParagraphStyle(RtfParagraphStyle rtfParagraphStyle)
rtfParagraphStyle
- The RtfParagraphStyle to register.public void setDataCacheStyle(int dataCacheStyle)
dataCacheStyle
- The data cache style to set. Valid constants can be found
in RtfDataCache.RtfDataCache
public int getDataCacheStyle()
public boolean isImagePDFConformance()
public void setImagePDFConformance(boolean imagePDFConformance)
false
if images should be generated with the Word default DPI setting.
imagePDFConformance
- True
if PDF equivalence is desired, false
for the default Word display.public boolean isWriteImageScalingInformation()
public void setWriteImageScalingInformation(boolean writeImageScalingInformation)
true
MS Word 2000, MS Word 97 and Word for Mac.
writeImageScalingInformation
- Whether to write image scaling information.public void setOptionsForMSWord2000And97()
outputTableRowDefinitionAfter = true
and writeImageScalingInformation = true
.
public void setOptionsForMSWordForMac()
writeImageScalingInformation = true
.
public void setOptionsForMSWordXP()
writeImageScalingInformation = false
.
public void setOptionsForOpenOfficeOrg()
outputTableRowDefinitionAfter = false
.
public boolean setProtection(int level, java.lang.String pwd)
level
- Document protecton levelpwd
- Document password - clear textpublic boolean unprotectDocument(java.lang.String pwd)
pwd
- Document password - clear text
public boolean setProtectionLevel(int level)
level
- Document protection levelpublic void setPasswordHash(java.lang.String pwd)
pwd
- Password HASH to set the document password hash to.public int getProtectionLevelRaw()
public int getProtectionLevel()
public byte[] getProtectionLevelBytes()
public boolean setNewPassword(java.lang.String oldPwd, java.lang.String newPwd)
oldPwd
- Old password - clear textnewPwd
- New password - clear text
public void setReadOnlyRecommended(boolean value)
value
- true if the flag is to be set, false if it is NOT to be setpublic boolean getReadOnlyRecommended()
public boolean isDocumentProtected()
public byte[] getProtectionHashBytes()
public void setImageWrittenAsBinary(boolean imageWrittenAsBinary)
imageWrittenAsBinary
- True
to write images as binary data, false
for hex encoding.public boolean isImageWrittenAsBinary()
true
.
Author: Mark Hall (Mark.Hall@mail.room3b.eu)
True
if images are written as binary data, false
if hex encoded.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |