WordProcessingSaveOptions

Inheritance: java.lang.Object

All Implemented Interfaces: com.groupdocs.editor.options.ISaveOptions

public final class WordProcessingSaveOptions implements ISaveOptions

Allows to specify custom options for generating and saving WordProcessing-compliant documents after they were edited


WordProcessingSaveOptions is applied in situations when there is an instance of EditableDocument class, that contains an edited document content, and it is required to save this content to the new document of WordProcessing format.

Constructors

Constructor Description
WordProcessingSaveOptions() This parameterless constructor creates a new instance of WordProcessingSaveOptions with DOCX output format (can be modified then through OutputFormat (#getOutputFormat.getOutputFormat/#setOutputFormat(WordProcessingFormats).setOutputFormat(WordProcessingFormats)) property)
WordProcessingSaveOptions(WordProcessingFormats outputFormat) Creates a new instance of WordProcessingSaveOptions with specified mandatory WordProcessing output format, while all other parameters are default

Methods

Method Description
getEnablePagination() Allows to enable or disable pagination which will be used for saving the document.
setEnablePagination(boolean value) Allows to enable or disable pagination which will be used for saving the document.
getPassword() Allows to specify, modify, obtain, or remove a password, which will be used to encode the generated WordProcessing document.
setPassword(String value) Allows to specify, modify, obtain, or remove a password, which will be used to encode the generated WordProcessing document.
getOutputFormat() Allows to specify a WordProcessing format, which will be used for saving the document
setOutputFormat(WordProcessingFormats value) Allows to specify a WordProcessing format, which will be used for saving the document
getLocale() Allows to set override default locale (language) for the WordProcessing document, which will be applied during its creation.
setLocale(Locale value) Allows to set override default locale (language) for the WordProcessing document, which will be applied during its creation.
getLocaleBi() Allows to set override locale (language) for the WordProcessing document for the RTL (right-to-left) text, which will be applied during its creation.
setLocaleBi(Locale value) Allows to set override locale (language) for the WordProcessing document for the RTL (right-to-left) text, which will be applied during its creation.
getLocaleFarEast() Allows to override the locale (language) for the WordProcessing document for the East-Asian text, which will be applied during its creation.
setLocaleFarEast(Locale value) Allows to override the locale (language) for the WordProcessing document for the East-Asian text, which will be applied during its creation.
getOptimizeMemoryUsage() Enables memory optimization mechanisms during document generation from HTML, which degrades performance in as a cost of decreasing memory usage.
setOptimizeMemoryUsage(boolean value) Enables memory optimization mechanisms during document generation from HTML, which degrades performance in as a cost of decreasing memory usage.
getProtection() Allows to control and apply the document protection options for the WordProcessing document of any format, which supports document protection.
setProtection(WordProcessingProtection value) Allows to control and apply the document protection options for the WordProcessing document of any format, which supports document protection.
getFontEmbedding() Responsible for embedding font resources into output WordProcessing document.
setFontEmbedding(int value) Responsible for embedding font resources into output WordProcessing document.
deepClone() Creates and returns a full copy of this instance of WordProcessingSaveOptions class

WordProcessingSaveOptions()

public WordProcessingSaveOptions()

This parameterless constructor creates a new instance of WordProcessingSaveOptions with DOCX output format (can be modified then through OutputFormat (#getOutputFormat.getOutputFormat/#setOutputFormat(WordProcessingFormats).setOutputFormat(WordProcessingFormats)) property)

WordProcessingSaveOptions(WordProcessingFormats outputFormat)

public WordProcessingSaveOptions(WordProcessingFormats outputFormat)

Creates a new instance of WordProcessingSaveOptions with specified mandatory WordProcessing output format, while all other parameters are default

Parameters:

Parameter Type Description
outputFormat WordProcessingFormats Mandatory output format, in which the WordProcessing document should be saved

getEnablePagination()

public final boolean getEnablePagination()

Allows to enable or disable pagination which will be used for saving the document. If the original document was opened and edited in pagination mode, this option also should be enabled. By default is disabled.

Returns: boolean -

setEnablePagination(boolean value)

public final void setEnablePagination(boolean value)

Allows to enable or disable pagination which will be used for saving the document. If the original document was opened and edited in pagination mode, this option also should be enabled. By default is disabled.

Parameters:

Parameter Type Description
value boolean

getPassword()

public final String getPassword()

Allows to specify, modify, obtain, or remove a password, which will be used to encode the generated WordProcessing document. Specify NULL or empty string for removing (cleaning) the password.

Returns: java.lang.String -

setPassword(String value)

public final void setPassword(String value)

Allows to specify, modify, obtain, or remove a password, which will be used to encode the generated WordProcessing document. Specify NULL or empty string for removing (cleaning) the password.

Parameters:

Parameter Type Description
value java.lang.String

getOutputFormat()

public final WordProcessingFormats getOutputFormat()

Allows to specify a WordProcessing format, which will be used for saving the document

Returns: WordProcessingFormats -

setOutputFormat(WordProcessingFormats value)

public final void setOutputFormat(WordProcessingFormats value)

Allows to specify a WordProcessing format, which will be used for saving the document

Parameters:

Parameter Type Description
value WordProcessingFormats

getLocale()

public final Locale getLocale()

Allows to set override default locale (language) for the WordProcessing document, which will be applied during its creation. When is not specified (default value), MS Word (or other program) will detect (or choose) the document locale according to its own settings or other factors.


This option forcibly applies the specified locale to overall text in the document. Do not use it, if document contains different parts of text, which are written on different languages.

Returns: java.util.Locale -

setLocale(Locale value)

public final void setLocale(Locale value)

Allows to set override default locale (language) for the WordProcessing document, which will be applied during its creation. When is not specified (default value), MS Word (or other program) will detect (or choose) the document locale according to its own settings or other factors.


This option forcibly applies the specified locale to overall text in the document. Do not use it, if document contains different parts of text, which are written on different languages.

Parameters:

Parameter Type Description
value java.util.Locale

getLocaleBi()

public final Locale getLocaleBi()

Allows to set override locale (language) for the WordProcessing document for the RTL (right-to-left) text, which will be applied during its creation. When is not specified (default value), MS Word (or other program) will detect (or choose) the document RTL locale according to its own settings or other factors.


This option forcibly applies the specified locale to overall RTL text in the document. Do not use it, if document contains different parts of text, which are written on different languages.

Returns: java.util.Locale -

setLocaleBi(Locale value)

public final void setLocaleBi(Locale value)

Allows to set override locale (language) for the WordProcessing document for the RTL (right-to-left) text, which will be applied during its creation. When is not specified (default value), MS Word (or other program) will detect (or choose) the document RTL locale according to its own settings or other factors.


This option forcibly applies the specified locale to overall RTL text in the document. Do not use it, if document contains different parts of text, which are written on different languages.

Parameters:

Parameter Type Description
value java.util.Locale

getLocaleFarEast()

public final Locale getLocaleFarEast()

Allows to override the locale (language) for the WordProcessing document for the East-Asian text, which will be applied during its creation. When is not specified (default value), MS Word (or other program) will detect (or choose) the document East-Asian locale according to its own settings or other factors.


This option forcibly applies the specified locale to overall East-Asian text in the document. Do not use it, if document contains different parts of text, which are written on different languages.

Returns: java.util.Locale -

setLocaleFarEast(Locale value)

public final void setLocaleFarEast(Locale value)

Allows to override the locale (language) for the WordProcessing document for the East-Asian text, which will be applied during its creation. When is not specified (default value), MS Word (or other program) will detect (or choose) the document East-Asian locale according to its own settings or other factors.


This option forcibly applies the specified locale to overall East-Asian text in the document. Do not use it, if document contains different parts of text, which are written on different languages.

Parameters:

Parameter Type Description
value java.util.Locale

getOptimizeMemoryUsage()

public final boolean getOptimizeMemoryUsage()

Enables memory optimization mechanisms during document generation from HTML, which degrades performance in as a cost of decreasing memory usage. Setting this option to true can significantly decrease memory consumption while generating large documents at the cost of slower saving time. Default is false (memory optimization is disabled for the sake of better performance).

Returns: boolean -

setOptimizeMemoryUsage(boolean value)

public final void setOptimizeMemoryUsage(boolean value)

Enables memory optimization mechanisms during document generation from HTML, which degrades performance in as a cost of decreasing memory usage. Setting this option to true can significantly decrease memory consumption while generating large documents at the cost of slower saving time. Default is false (memory optimization is disabled for the sake of better performance).

Parameters:

Parameter Type Description
value boolean

getProtection()

public final WordProcessingProtection getProtection()

Allows to control and apply the document protection options for the WordProcessing document of any format, which supports document protection. By default is NULL - document protection will not be used.

Returns: WordProcessingProtection -

setProtection(WordProcessingProtection value)

public final void setProtection(WordProcessingProtection value)

Allows to control and apply the document protection options for the WordProcessing document of any format, which supports document protection. By default is NULL - document protection will not be used.

Parameters:

Parameter Type Description
value WordProcessingProtection

getFontEmbedding()

public final int getFontEmbedding()

Responsible for embedding font resources into output WordProcessing document. By default doesn’t embed any fonts (NotEmbed).

Returns: int -

setFontEmbedding(int value)

public final void setFontEmbedding(int value)

Responsible for embedding font resources into output WordProcessing document. By default doesn’t embed any fonts (NotEmbed).

Parameters:

Parameter Type Description
value int

deepClone()

public final WordProcessingSaveOptions deepClone()

Creates and returns a full copy of this instance of WordProcessingSaveOptions class

Returns: WordProcessingSaveOptions - New WordProcessingSaveOptions instance