public class WordProcessingOptions extends Object
The WordProcessingOptions class provides options for rendering word processing documents in the GroupDocs.Viewer component. It encapsulates settings and parameters that can be used to control the rendering process and output format for word processing files. For details, see the documentation.
Example usage:
PngViewOptions pngViewOptions = new PngViewOptions();
WordProcessingOptions wordProcessingOptions = pngViewOptions.getWordProcessingOptions();
wordProcessingOptions.setRenderTrackedChanges(true);
wordProcessingOptions.setLeftMargin(32f);
try (Viewer viewer = new Viewer("document.docx")) {
viewer.view(pngViewOptions);
// Use the viewer object for further operations
}
Viewer,
PngViewOptions| Constructor and Description |
|---|
WordProcessingOptions()
Initializes a new instance of the
WordProcessingOptions class. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Check if the options are changed.
|
Double |
getBottomMargin()
Bottom page margin (for HTML rendering only)
|
Double |
getLeftMargin()
Retrieves the left page margin for HTML rendering.
|
PageSize |
getPageSize()
Retrieves the page size for rendering HTM and HTML files.
|
Double |
getRightMargin()
Gets the right page margin for HTML rendering.
|
Double |
getTopMargin()
Retrieves the top page margin for HTML rendering.
|
int |
hashCode() |
boolean |
isEnableOpenTypeFeatures()
This option enables kerning and other OpenType Features when rendering Arabic, Hebrew, Indian scripts, Latin-based or Cyrillic-based scripts.
|
boolean |
isRenderTrackedChanges()
Indicates whether tracked changes (revisions) rendering is enabled.
|
boolean |
isUnlinkTableOfContents()
Indicates whether table of contents navigation should be disabled when rendering to HTML or PDF.
|
boolean |
isUpdateFields()
Gets a value determining if fields of certain types should be updated before saving the input WordProcessing
document to the HTML, PDF, PNG, or JPEG output formats.
|
void |
setBottomMargin(Double bottomMargin)
Sets the bottom page margin for HTML rendering.
|
void |
setEnableOpenTypeFeatures(boolean enableOpenTypeFeatures)
This option enables kerning and other OpenType Features when rendering Arabic, Hebrew, Indian scripts, Latin-based or Cyrillic-based scripts.
|
void |
setLeftMargin(Double leftMargin)
Sets the left page margin for HTML rendering.
|
void |
setPageSize(PageSize pageSize)
Sets the page size for rendering HTM and HTML files.
|
void |
setRenderTrackedChanges(boolean value)
Sets whether tracked changes (revisions) rendering is enabled.
|
void |
setRightMargin(Double rightMargin)
Sets the right page margin for HTML rendering.
|
void |
setTopMargin(Double topMargin)
Sets the top page margin for HTML rendering.
|
void |
setUnlinkTableOfContents(boolean unlinkTableOfContents)
Sets whether table of contents navigation should be disabled when rendering to HTML or PDF.
|
void |
setUpdateFields(boolean updateFields)
Sets a value determining if fields of certain types should be updated before saving the input WordProcessing
document to the HTML, PDF, PNG, or JPEG output formats.
|
public WordProcessingOptions()
Initializes a new instance of the WordProcessingOptions class.
Contains options for rendering word processing documents. For details, see the documentation.
public boolean equals(Object o)
Check if the options are changed.
public Double getBottomMargin()
Bottom page margin (for HTML rendering only)
For details, see the documentation.public Double getLeftMargin()
Retrieves the left page margin for HTML rendering.
For details, see the documentation.public PageSize getPageSize()
Retrieves the page size for rendering HTM and HTML files.
When using the default page size, some content may not fit into the page frame.
To fit the contents, you can set a larger page size, such as A3, using PageSize.A3.
Note: The default value is PageSize.UNSPECIFIED, which means that a page size set in the page settings (Page Setup) will be used.
public Double getRightMargin()
Gets the right page margin for HTML rendering.
For details, see the documentation.public Double getTopMargin()
Retrieves the top page margin for HTML rendering.
For details, see the documentation.public int hashCode()
Computes the hash code value for this object. The hash code is based on the internal state of the object and is used in hash-based data structures such as hash maps and hash sets.
Note: This method overrides the default implementation of the hashCode() method defined in the Object class.
public boolean isEnableOpenTypeFeatures()
This option enables kerning and other OpenType Features when rendering Arabic, Hebrew, Indian scripts, Latin-based or Cyrillic-based scripts.
public final boolean isRenderTrackedChanges()
Indicates whether tracked changes (revisions) rendering is enabled.
For details, see the documentation.true if tracked changes rendering is enabled, false otherwise.public boolean isUnlinkTableOfContents()
public boolean isUpdateFields()
For details, see the documentation.
public void setBottomMargin(Double bottomMargin)
Sets the bottom page margin for HTML rendering.
For details, see the documentation.bottomMargin - The bottom page margin to set.public void setEnableOpenTypeFeatures(boolean enableOpenTypeFeatures)
This option enables kerning and other OpenType Features when rendering Arabic, Hebrew, Indian scripts, Latin-based or Cyrillic-based scripts.
enableOpenTypeFeatures - True to enable OpenType features, false otherwise.public void setLeftMargin(Double leftMargin)
Sets the left page margin for HTML rendering.
For details, see the documentation.leftMargin - The left page margin value to set.public void setPageSize(PageSize pageSize)
Sets the page size for rendering HTM and HTML files.
When using the default page size, some content may not fit into the page frame.
To fit the contents, you can set a larger page size, such as A3, using PageSize.A3.
Note: The default value is PageSize.UNSPECIFIED, which means that a page size set in the page settings (Page Setup) will be used.
pageSize - The size of the output page.public final void setRenderTrackedChanges(boolean value)
Sets whether tracked changes (revisions) rendering is enabled.
For details, see the documentation.value - true to enable tracked changes rendering, false to disable it.public void setRightMargin(Double rightMargin)
Sets the right page margin for HTML rendering.
For details, see the documentation.rightMargin - The right page margin value to set.public void setTopMargin(Double topMargin)
Sets the top page margin for HTML rendering.
For details, see the documentation.topMargin - The top page margin to set.public void setUnlinkTableOfContents(boolean unlinkTableOfContents)
unlinkTableOfContents - Indicates whether table of content navigation should be disabled.public void setUpdateFields(boolean updateFields)
For details, see the documentation.
Copyright © 2025. All rights reserved.