public class HtmlSaveOptions extends SaveOptions implements java.lang.Cloneable
SaveFormat.HTML, SaveFormat.MHTML, SaveFormat.EPUB or SaveFormat.AZW_3 format.
To learn more, visit the Specify Save Options documentation article.
| Constructor and Description |
|---|
HtmlSaveOptions()
Initializes a new instance of this class that can be used to save a document in the
SaveFormat.HTML format. |
HtmlSaveOptions(int saveFormat)
Initializes a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowNegativeIndent()
Specifies whether negative left and right indents of paragraphs are normalized when saving to HTML, MHTML or EPUB.
|
java.lang.String |
getCssClassNamePrefix()
Specifies a prefix which is added to all CSS class names.
|
ICssSavingCallback |
getCssSavingCallback()
Allows to control how CSS styles are saved when a document is saved to HTML, MHTML or EPUB.
|
java.lang.String |
getCssStyleSheetFileName()
Specifies the path and the name of the Cascading Style Sheet (CSS) file written when a document is exported to HTML.
|
int |
getCssStyleSheetType()
Specifies how CSS (Cascading Style Sheet) styles are exported to HTML, MHTML or EPUB.
|
IDocumentPartSavingCallback |
getDocumentPartSavingCallback()
Allows to control how document parts are saved when a document is saved to HTML or EPUB.
|
int |
getDocumentSplitCriteria()
Specifies how the document should be split when saving to
SaveFormat.HTML, SaveFormat.EPUB or SaveFormat.AZW_3 format. |
int |
getDocumentSplitHeadingLevel()
Specifies the maximum level of headings at which to split the document.
|
java.nio.charset.Charset |
getEncoding() |
int |
getEpubNavigationMapLevel()
Specifies the maximum level of headings populated to the navigation map when exporting to IDPF EPUB format.
|
boolean |
getExportCidUrlsForMhtmlResources()
Specifies whether to use CID (Content-ID) URLs to reference resources (images, fonts, CSS) included in MHTML documents.
|
boolean |
getExportDocumentProperties()
Specifies whether to export built-in and custom document properties to HTML, MHTML or EPUB.
|
boolean |
getExportDropDownFormFieldAsText()
Controls how drop-down form fields are saved to HTML or MHTML.
|
boolean |
getExportFontResources()
Specifies whether font resources should be exported to HTML, MHTML or EPUB.
|
boolean |
getExportFontsAsBase64()
Specifies whether fonts resources should be embedded to HTML in Base64 encoding.
|
int |
getExportHeadersFootersMode()
Specifies how headers and footers are output to HTML, MHTML or EPUB.
|
boolean |
getExportImagesAsBase64()
Specifies whether images are saved in Base64 format to the output HTML, MHTML or EPUB.
|
boolean |
getExportLanguageInformation()
Specifies whether language information is exported to HTML, MHTML or EPUB.
|
int |
getExportListLabels()
Controls how list labels are output to HTML, MHTML or EPUB.
|
boolean |
getExportOriginalUrlForLinkedImages()
Specifies whether original URL should be used as the URL of the linked images.
|
boolean |
getExportPageMargins()
Specifies whether page margins is exported to HTML, MHTML or EPUB.
|
boolean |
getExportPageSetup()
Specifies whether page setup is exported to HTML, MHTML or EPUB.
|
boolean |
getExportRelativeFontSize()
Specifies whether font sizes should be output in relative units when saving to HTML, MHTML or EPUB.
|
boolean |
getExportRoundtripInformation()
Specifies whether to write the roundtrip information when saving to HTML, MHTML or EPUB.
|
boolean |
getExportShapesAsSvg()
Controls whether
Shape nodes are converted to SVG images when saving to HTML, MHTML, EPUB or AZW3. |
boolean |
getExportTextInputFormFieldAsText()
Controls how text input form fields are saved to HTML or MHTML.
|
boolean |
getExportTocPageNumbers()
Specifies whether to write page numbers to table of contents when saving HTML, MHTML and EPUB.
|
boolean |
getExportXhtmlTransitional()
Specifies whether to write the DOCTYPE declaration when saving to HTML or MHTML.
|
int |
getFontResourcesSubsettingSizeThreshold()
Controls which font resources need subsetting when saving to HTML, MHTML or EPUB.
|
IFontSavingCallback |
getFontSavingCallback()
Allows to control how fonts are saved when a document is saved to HTML, MHTML or EPUB.
|
java.lang.String |
getFontsFolder()
Specifies the physical folder where fonts are saved when exporting a document to HTML.
|
java.lang.String |
getFontsFolderAlias()
Specifies the name of the folder used to construct font URIs written into an HTML document.
|
int |
getHtmlVersion()
Specifies version of HTML standard that should be used when saving the document to HTML or MHTML.
|
int |
getImageResolution()
Specifies the output resolution for images when exporting to HTML, MHTML or EPUB.
|
IImageSavingCallback |
getImageSavingCallback()
Allows to control how images are saved when a document is saved to HTML, MHTML or EPUB.
|
java.lang.String |
getImagesFolder()
Specifies the physical folder where images are saved when exporting a document to HTML format.
|
java.lang.String |
getImagesFolderAlias()
Specifies the name of the folder used to construct image URIs written into an HTML document.
|
int |
getMetafileFormat()
Specifies in what format metafiles are saved when exporting to HTML, MHTML, or EPUB.
|
int |
getOfficeMathOutputMode()
Controls how OfficeMath objects are exported to HTML, MHTML or EPUB.
|
boolean |
getResolveFontNames()
Specifies whether font family names used in the document are resolved and substituted according to
Document.getFontSettings() / Document.setFontSettings(com.aspose.words.FontSettings) when being written into HTML-based formats. |
java.lang.String |
getResourceFolder()
Specifies a physical folder where all resources like images, fonts, and external CSS are saved when a document is exported to HTML.
|
java.lang.String |
getResourceFolderAlias()
Specifies the name of the folder used to construct URIs of all resources written into an HTML document.
|
int |
getSaveFormat()
Specifies the format in which the document will be saved if this save options object is used.
|
boolean |
getScaleImageToShapeSize()
Specifies whether images are scaled by Aspose.Words to the bounding shape size when exporting to HTML, MHTML or EPUB.
|
int |
getTableWidthOutputMode()
Controls how table, row and cell widths are exported to HTML, MHTML or EPUB.
|
protected java.lang.Object |
memberwiseClone() |
void |
setAllowNegativeIndent(boolean value)
Specifies whether negative left and right indents of paragraphs are normalized when saving to HTML, MHTML or EPUB.
|
void |
setCssClassNamePrefix(java.lang.String value)
Specifies a prefix which is added to all CSS class names.
|
void |
setCssSavingCallback(ICssSavingCallback value)
Allows to control how CSS styles are saved when a document is saved to HTML, MHTML or EPUB.
|
void |
setCssStyleSheetFileName(java.lang.String value)
Specifies the path and the name of the Cascading Style Sheet (CSS) file written when a document is exported to HTML.
|
void |
setCssStyleSheetType(int value)
Specifies how CSS (Cascading Style Sheet) styles are exported to HTML, MHTML or EPUB.
|
void |
setDocumentPartSavingCallback(IDocumentPartSavingCallback value)
Allows to control how document parts are saved when a document is saved to HTML or EPUB.
|
void |
setDocumentSplitCriteria(int value)
Specifies how the document should be split when saving to
SaveFormat.HTML, SaveFormat.EPUB or SaveFormat.AZW_3 format. |
void |
setDocumentSplitHeadingLevel(int value)
Specifies the maximum level of headings at which to split the document.
|
void |
setEncoding(java.nio.charset.Charset value) |
void |
setEpubNavigationMapLevel(int value)
Specifies the maximum level of headings populated to the navigation map when exporting to IDPF EPUB format.
|
void |
setExportCidUrlsForMhtmlResources(boolean value)
Specifies whether to use CID (Content-ID) URLs to reference resources (images, fonts, CSS) included in MHTML documents.
|
void |
setExportDocumentProperties(boolean value)
Specifies whether to export built-in and custom document properties to HTML, MHTML or EPUB.
|
void |
setExportDropDownFormFieldAsText(boolean value)
Controls how drop-down form fields are saved to HTML or MHTML.
|
void |
setExportFontResources(boolean value)
Specifies whether font resources should be exported to HTML, MHTML or EPUB.
|
void |
setExportFontsAsBase64(boolean value)
Specifies whether fonts resources should be embedded to HTML in Base64 encoding.
|
void |
setExportHeadersFootersMode(int value)
Specifies how headers and footers are output to HTML, MHTML or EPUB.
|
void |
setExportImagesAsBase64(boolean value)
Specifies whether images are saved in Base64 format to the output HTML, MHTML or EPUB.
|
void |
setExportLanguageInformation(boolean value)
Specifies whether language information is exported to HTML, MHTML or EPUB.
|
void |
setExportListLabels(int value)
Controls how list labels are output to HTML, MHTML or EPUB.
|
void |
setExportOriginalUrlForLinkedImages(boolean value)
Specifies whether original URL should be used as the URL of the linked images.
|
void |
setExportPageMargins(boolean value)
Specifies whether page margins is exported to HTML, MHTML or EPUB.
|
void |
setExportPageSetup(boolean value)
Specifies whether page setup is exported to HTML, MHTML or EPUB.
|
void |
setExportRelativeFontSize(boolean value)
Specifies whether font sizes should be output in relative units when saving to HTML, MHTML or EPUB.
|
void |
setExportRoundtripInformation(boolean value)
Specifies whether to write the roundtrip information when saving to HTML, MHTML or EPUB.
|
void |
setExportShapesAsSvg(boolean value)
Controls whether
Shape nodes are converted to SVG images when saving to HTML, MHTML, EPUB or AZW3. |
void |
setExportTextInputFormFieldAsText(boolean value)
Controls how text input form fields are saved to HTML or MHTML.
|
void |
setExportTocPageNumbers(boolean value)
Specifies whether to write page numbers to table of contents when saving HTML, MHTML and EPUB.
|
void |
setExportXhtmlTransitional(boolean value)
Specifies whether to write the DOCTYPE declaration when saving to HTML or MHTML.
|
void |
setFontResourcesSubsettingSizeThreshold(int value)
Controls which font resources need subsetting when saving to HTML, MHTML or EPUB.
|
void |
setFontSavingCallback(IFontSavingCallback value)
Allows to control how fonts are saved when a document is saved to HTML, MHTML or EPUB.
|
void |
setFontsFolder(java.lang.String value)
Specifies the physical folder where fonts are saved when exporting a document to HTML.
|
void |
setFontsFolderAlias(java.lang.String value)
Specifies the name of the folder used to construct font URIs written into an HTML document.
|
void |
setHtmlVersion(int value)
Specifies version of HTML standard that should be used when saving the document to HTML or MHTML.
|
void |
setImageResolution(int value)
Specifies the output resolution for images when exporting to HTML, MHTML or EPUB.
|
void |
setImageSavingCallback(IImageSavingCallback value)
Allows to control how images are saved when a document is saved to HTML, MHTML or EPUB.
|
void |
setImagesFolder(java.lang.String value)
Specifies the physical folder where images are saved when exporting a document to HTML format.
|
void |
setImagesFolderAlias(java.lang.String value)
Specifies the name of the folder used to construct image URIs written into an HTML document.
|
void |
setMetafileFormat(int value)
Specifies in what format metafiles are saved when exporting to HTML, MHTML, or EPUB.
|
void |
setOfficeMathOutputMode(int value)
Controls how OfficeMath objects are exported to HTML, MHTML or EPUB.
|
void |
setResolveFontNames(boolean value)
Specifies whether font family names used in the document are resolved and substituted according to
Document.getFontSettings() / Document.setFontSettings(com.aspose.words.FontSettings) when being written into HTML-based formats. |
void |
setResourceFolder(java.lang.String value)
Specifies a physical folder where all resources like images, fonts, and external CSS are saved when a document is exported to HTML.
|
void |
setResourceFolderAlias(java.lang.String value)
Specifies the name of the folder used to construct URIs of all resources written into an HTML document.
|
void |
setSaveFormat(int value)
Specifies the format in which the document will be saved if this save options object is used.
|
void |
setScaleImageToShapeSize(boolean value)
Specifies whether images are scaled by Aspose.Words to the bounding shape size when exporting to HTML, MHTML or EPUB.
|
void |
setTableWidthOutputMode(int value)
Controls how table, row and cell widths are exported to HTML, MHTML or EPUB.
|
createSaveOptions, createSaveOptions, getAllowEmbeddingPostScriptFonts, getDefaultTemplate, getDml3DEffectsRenderingMode, getDmlEffectsRenderingMode, getDmlRenderingMode, getExportGeneratorName, getImlRenderingMode, getMemoryOptimization, getPrettyFormat, getProgressCallback, getTempFolder, getUpdateCreatedTimeProperty, getUpdateFields, getUpdateLastPrintedProperty, getUpdateLastSavedTimeProperty, getUpdateSdtContent, getUseAntiAliasing, getUseHighQualityRendering, setAllowEmbeddingPostScriptFonts, setDefaultTemplate, setDml3DEffectsRenderingMode, setDmlEffectsRenderingMode, setDmlRenderingMode, setExportGeneratorName, setImlRenderingMode, setMemoryOptimization, setPrettyFormat, setProgressCallback, setTempFolder, setUpdateCreatedTimeProperty, setUpdateFields, setUpdateLastPrintedProperty, setUpdateLastSavedTimeProperty, setUpdateSdtContent, setUseAntiAliasing, setUseHighQualityRenderingpublic HtmlSaveOptions()
SaveFormat.HTML format.public HtmlSaveOptions(int saveFormat)
public int getSaveFormat()
SaveFormat.HTML, SaveFormat.MHTML, SaveFormat.EPUB or SaveFormat.AZW_3.getSaveFormat in class SaveOptionsint value. The returned value is one of SaveFormat constants.public void setSaveFormat(int value)
SaveFormat.HTML, SaveFormat.MHTML, SaveFormat.EPUB or SaveFormat.AZW_3.setSaveFormat in class SaveOptionsvalue - The corresponding int value. The value must be one of SaveFormat constants.public boolean getAllowNegativeIndent()
false.
When negative indent is not allowed, it is exported as zero margin to HTML. When negative indent is allowed, a paragraph might appear partially outside of the browser window.
boolean value.public void setAllowNegativeIndent(boolean value)
false.
When negative indent is not allowed, it is exported as zero margin to HTML. When negative indent is allowed, a paragraph might appear partially outside of the browser window.
value - The corresponding boolean value.public java.lang.String getCssStyleSheetFileName()
This property has effect only when saving a document to HTML format and external CSS style sheet is requested using getCssStyleSheetType() / setCssStyleSheetType(int).
If this property is empty, the CSS file will be saved into the same folder and with the same name as the HTML document but with the ".css" extension.
If only path but no file name is specified in this property, the CSS file will be saved into the specified folder and will have the same name as the HTML document but with the ".css" extension.
If the folder specified by this property doesn't exist, it will be created automatically before the CSS file is saved.
Another way to specify a folder where external CSS file is saved is to use getResourceFolder() / setResourceFolder(java.lang.String).
String value.getResourceFolder(),
setResourceFolder(java.lang.String),
getResourceFolderAlias(),
setResourceFolderAlias(java.lang.String),
getCssStyleSheetType(),
setCssStyleSheetType(int)public void setCssStyleSheetFileName(java.lang.String value)
This property has effect only when saving a document to HTML format and external CSS style sheet is requested using getCssStyleSheetType() / setCssStyleSheetType(int).
If this property is empty, the CSS file will be saved into the same folder and with the same name as the HTML document but with the ".css" extension.
If only path but no file name is specified in this property, the CSS file will be saved into the specified folder and will have the same name as the HTML document but with the ".css" extension.
If the folder specified by this property doesn't exist, it will be created automatically before the CSS file is saved.
Another way to specify a folder where external CSS file is saved is to use getResourceFolder() / setResourceFolder(java.lang.String).
value - The corresponding String value.getResourceFolder(),
setResourceFolder(java.lang.String),
getResourceFolderAlias(),
setResourceFolderAlias(java.lang.String),
getCssStyleSheetType(),
setCssStyleSheetType(int)public int getCssStyleSheetType()
CssStyleSheetType.INLINE for HTML/MHTML and CssStyleSheetType.EXTERNAL for EPUB.
Saving CSS style sheet into an external file is only supported when saving to HTML. When you are exporting to one of the container formats (EPUB or MHTML) and specifying CssStyleSheetType.EXTERNAL, CSS file will be encapsulated into the output package.
int value. The returned value is one of CssStyleSheetType constants.getCssStyleSheetFileName(),
setCssStyleSheetFileName(java.lang.String)public void setCssStyleSheetType(int value)
CssStyleSheetType.INLINE for HTML/MHTML and CssStyleSheetType.EXTERNAL for EPUB.
Saving CSS style sheet into an external file is only supported when saving to HTML. When you are exporting to one of the container formats (EPUB or MHTML) and specifying CssStyleSheetType.EXTERNAL, CSS file will be encapsulated into the output package.
value - The corresponding int value. The value must be one of CssStyleSheetType constants.getCssStyleSheetFileName(),
setCssStyleSheetFileName(java.lang.String)public java.lang.String getCssClassNamePrefix()
If this value is not empty, all CSS classes generated by Aspose.Words will start with the specified prefix. This might be useful, for example, if you add custom CSS to generated documents and want to prevent class name conflicts.
If the value is not null or empty, it must be a valid CSS identifier.
String value.java.lang.IllegalArgumentException - The value is not empty and is not a valid CSS identifier.public void setCssClassNamePrefix(java.lang.String value)
If this value is not empty, all CSS classes generated by Aspose.Words will start with the specified prefix. This might be useful, for example, if you add custom CSS to generated documents and want to prevent class name conflicts.
If the value is not null or empty, it must be a valid CSS identifier.
value - The corresponding String value.java.lang.IllegalArgumentException - The value is not empty and is not a valid CSS identifier.public IDocumentPartSavingCallback getDocumentPartSavingCallback()
IDocumentPartSavingCallback value.public void setDocumentPartSavingCallback(IDocumentPartSavingCallback value)
value - The corresponding IDocumentPartSavingCallback value.public ICssSavingCallback getCssSavingCallback()
ICssSavingCallback value.public void setCssSavingCallback(ICssSavingCallback value)
value - The corresponding ICssSavingCallback value.public int getDocumentSplitCriteria()
SaveFormat.HTML, SaveFormat.EPUB or SaveFormat.AZW_3 format. Default is DocumentSplitCriteria.NONE for HTML and DocumentSplitCriteria.HEADING_PARAGRAPH for EPUB and AZW3.
Normally you would want a document saved to HTML as a single file. But in some cases it is preferable to split the output into several smaller HTML pages. When saving to HTML format these pages will be output to individual files or streams. When saving to EPUB format they will be incorporated into corresponding packages.
A document cannot be split when saving in the MHTML format.
int value. The returned value is a bitwise combination of DocumentSplitCriteria constants.getDocumentSplitHeadingLevel(),
setDocumentSplitHeadingLevel(int),
getDocumentPartSavingCallback(),
setDocumentPartSavingCallback(com.aspose.words.IDocumentPartSavingCallback)public void setDocumentSplitCriteria(int value)
SaveFormat.HTML, SaveFormat.EPUB or SaveFormat.AZW_3 format. Default is DocumentSplitCriteria.NONE for HTML and DocumentSplitCriteria.HEADING_PARAGRAPH for EPUB and AZW3.
Normally you would want a document saved to HTML as a single file. But in some cases it is preferable to split the output into several smaller HTML pages. When saving to HTML format these pages will be output to individual files or streams. When saving to EPUB format they will be incorporated into corresponding packages.
A document cannot be split when saving in the MHTML format.
value - The corresponding int value. The value must be a bitwise combination of DocumentSplitCriteria constants.getDocumentSplitHeadingLevel(),
setDocumentSplitHeadingLevel(int),
getDocumentPartSavingCallback(),
setDocumentPartSavingCallback(com.aspose.words.IDocumentPartSavingCallback)public int getDocumentSplitHeadingLevel()
2.
When getDocumentSplitCriteria() / setDocumentSplitCriteria(int) includes DocumentSplitCriteria.HEADING_PARAGRAPH and this property is set to a value from 1 to 9, the document will be split at paragraphs formatted using Heading 1, Heading 2 , Heading 3 etc. styles up to the specified heading level.
By default, only Heading 1 and Heading 2 paragraphs cause the document to be split. Setting this property to zero will cause the document not to be split at heading paragraphs at all.
int value.getDocumentSplitCriteria(),
setDocumentSplitCriteria(int),
getDocumentPartSavingCallback(),
setDocumentPartSavingCallback(com.aspose.words.IDocumentPartSavingCallback)public void setDocumentSplitHeadingLevel(int value)
2.
When getDocumentSplitCriteria() / setDocumentSplitCriteria(int) includes DocumentSplitCriteria.HEADING_PARAGRAPH and this property is set to a value from 1 to 9, the document will be split at paragraphs formatted using Heading 1, Heading 2 , Heading 3 etc. styles up to the specified heading level.
By default, only Heading 1 and Heading 2 paragraphs cause the document to be split. Setting this property to zero will cause the document not to be split at heading paragraphs at all.
value - The corresponding int value.getDocumentSplitCriteria(),
setDocumentSplitCriteria(int),
getDocumentPartSavingCallback(),
setDocumentPartSavingCallback(com.aspose.words.IDocumentPartSavingCallback)public java.nio.charset.Charset getEncoding()
public void setEncoding(java.nio.charset.Charset value)
public int getEpubNavigationMapLevel()
3.
Navigation map in IDPF EPUB format allows user agents to provide easy way of navigation through the document structure. Usually navigation points correspond to headings in the document. To populate headings up to level N assign this value to getEpubNavigationMapLevel() / setEpubNavigationMapLevel(int).
By default, three levels of headings are populated: paragraphs of styles Heading 1, Heading 2 and Heading 3. You can set this property to a value from 1 to 9 to request corresponding maximum level. Setting it to zero will reduce navigation map to only document root or roots of document parts.
int value.public void setEpubNavigationMapLevel(int value)
3.
Navigation map in IDPF EPUB format allows user agents to provide easy way of navigation through the document structure. Usually navigation points correspond to headings in the document. To populate headings up to level N assign this value to getEpubNavigationMapLevel() / setEpubNavigationMapLevel(int).
By default, three levels of headings are populated: paragraphs of styles Heading 1, Heading 2 and Heading 3. You can set this property to a value from 1 to 9 to request corresponding maximum level. Setting it to zero will reduce navigation map to only document root or roots of document parts.
value - The corresponding int value.public boolean getExportDocumentProperties()
false.boolean value.public void setExportDocumentProperties(boolean value)
false.value - The corresponding boolean value.public boolean getExportFontResources()
false.
Exporting font resources allows for consistent document rendering independent of the fonts available in a given user's environment.
If getExportFontResources() / setExportFontResources(boolean) is set to true, main HTML document will refer to every font via the CSS 3 @font-face at-rule and fonts will be output as separate files. When exporting to IDPF EPUB or MHTML formats, fonts will be embedded into the corresponding package along with other subsidiary files.
If getExportFontsAsBase64() / setExportFontsAsBase64(boolean) is set to true, fonts will not be saved to separate files. Instead, they will be embedded into @font-face at-rules in Base64 encoding.
Important! When exporting font resources, font licensing issues should be considered. Authors who want to use specific fonts via a downloadable font mechanism must always carefully verify that their intended use is within the scope of the font license. Many commercial fonts presently do not allow web downloading of their fonts in any form. License agreements that cover some fonts specifically note that usage via @font-face rules in CSS style sheets is not allowed. Font subsetting can also violate license terms.
boolean value.getFontResourcesSubsettingSizeThreshold(),
setFontResourcesSubsettingSizeThreshold(int)public void setExportFontResources(boolean value)
false.
Exporting font resources allows for consistent document rendering independent of the fonts available in a given user's environment.
If getExportFontResources() / setExportFontResources(boolean) is set to true, main HTML document will refer to every font via the CSS 3 @font-face at-rule and fonts will be output as separate files. When exporting to IDPF EPUB or MHTML formats, fonts will be embedded into the corresponding package along with other subsidiary files.
If getExportFontsAsBase64() / setExportFontsAsBase64(boolean) is set to true, fonts will not be saved to separate files. Instead, they will be embedded into @font-face at-rules in Base64 encoding.
Important! When exporting font resources, font licensing issues should be considered. Authors who want to use specific fonts via a downloadable font mechanism must always carefully verify that their intended use is within the scope of the font license. Many commercial fonts presently do not allow web downloading of their fonts in any form. License agreements that cover some fonts specifically note that usage via @font-face rules in CSS style sheets is not allowed. Font subsetting can also violate license terms.
value - The corresponding boolean value.getFontResourcesSubsettingSizeThreshold(),
setFontResourcesSubsettingSizeThreshold(int)public boolean getExportFontsAsBase64()
false.
By default, fonts are written to separate files. If this option is set to true, fonts will be embedded into the document's CSS in Base64 encoding.
boolean value.public void setExportFontsAsBase64(boolean value)
false.
By default, fonts are written to separate files. If this option is set to true, fonts will be embedded into the document's CSS in Base64 encoding.
value - The corresponding boolean value.public int getExportHeadersFootersMode()
ExportHeadersFootersMode.PER_SECTION for HTML/MHTML and ExportHeadersFootersMode.NONE for EPUB.
It is hard to meaningfully output headers and footers to HTML because HTML is not paginated.
When this property is ExportHeadersFootersMode.PER_SECTION, Aspose.Words exports only primary headers and footers at the beginning and the end of each section.
When it is ExportHeadersFootersMode.FIRST_SECTION_HEADER_LAST_SECTION_FOOTER only first primary header and the last primary footer (including linked to previous) are exported.
You can disable export of headers and footers altogether by setting this property to ExportHeadersFootersMode.NONE.
int value. The returned value is one of ExportHeadersFootersMode constants.public void setExportHeadersFootersMode(int value)
ExportHeadersFootersMode.PER_SECTION for HTML/MHTML and ExportHeadersFootersMode.NONE for EPUB.
It is hard to meaningfully output headers and footers to HTML because HTML is not paginated.
When this property is ExportHeadersFootersMode.PER_SECTION, Aspose.Words exports only primary headers and footers at the beginning and the end of each section.
When it is ExportHeadersFootersMode.FIRST_SECTION_HEADER_LAST_SECTION_FOOTER only first primary header and the last primary footer (including linked to previous) are exported.
You can disable export of headers and footers altogether by setting this property to ExportHeadersFootersMode.NONE.
value - The corresponding int value. The value must be one of ExportHeadersFootersMode constants.public boolean getExportImagesAsBase64()
false.
When this property is set to true images data are exported directly into the img elements and separate files are not created.
boolean value.public void setExportImagesAsBase64(boolean value)
false.
When this property is set to true images data are exported directly into the img elements and separate files are not created.
value - The corresponding boolean value.public boolean getExportLanguageInformation()
false.
When this property is set to true Aspose.Words outputs lang HTML attribute on the document elements that specify language. This can be needed to preserve language related semantics.
boolean value.public void setExportLanguageInformation(boolean value)
false.
When this property is set to true Aspose.Words outputs lang HTML attribute on the document elements that specify language. This can be needed to preserve language related semantics.
value - The corresponding boolean value.public int getExportListLabels()
ExportListLabels.AUTO.int value. The returned value is one of ExportListLabels constants.public void setExportListLabels(int value)
ExportListLabels.AUTO.value - The corresponding int value. The value must be one of ExportListLabels constants.public int getMetafileFormat()
HtmlMetafileFormat.PNG, meaning that metafiles are rendered to raster PNG images.
Metafiles are not natively displayed by HTML browsers. By default, Aspose.Words converts WMF and EMF images into PNG files when exporting to HTML. Other options are to convert metafiles to SVG images or to export them as is without conversion.
Some image transforms, in particular image cropping, will not be applied to metafile images if they are exported to HTML without conversion.
int value. The returned value is one of HtmlMetafileFormat constants.getImageResolution(),
setImageResolution(int),
getScaleImageToShapeSize(),
setScaleImageToShapeSize(boolean)public void setMetafileFormat(int value)
HtmlMetafileFormat.PNG, meaning that metafiles are rendered to raster PNG images.
Metafiles are not natively displayed by HTML browsers. By default, Aspose.Words converts WMF and EMF images into PNG files when exporting to HTML. Other options are to convert metafiles to SVG images or to export them as is without conversion.
Some image transforms, in particular image cropping, will not be applied to metafile images if they are exported to HTML without conversion.
value - The corresponding int value. The value must be one of HtmlMetafileFormat constants.getImageResolution(),
setImageResolution(int),
getScaleImageToShapeSize(),
setScaleImageToShapeSize(boolean)public boolean getExportPageSetup()
false.
Each Section in Aspose.Words document model provides page setup information via PageSetup class. When you export a document to HTML format you might need to keep this information for further usage. In particular, page setup might be important for rendering to paged media (printing) or subsequent conversion to the native Microsoft Word file formats (DOCX, DOC, RTF, WML).
In most cases HTML is intended for viewing in browsers where pagination is not performed. So this feature is inactive by default.
boolean value.public void setExportPageSetup(boolean value)
false.
Each Section in Aspose.Words document model provides page setup information via PageSetup class. When you export a document to HTML format you might need to keep this information for further usage. In particular, page setup might be important for rendering to paged media (printing) or subsequent conversion to the native Microsoft Word file formats (DOCX, DOC, RTF, WML).
In most cases HTML is intended for viewing in browsers where pagination is not performed. So this feature is inactive by default.
value - The corresponding boolean value.public boolean getExportPageMargins()
false.
Aspose.Words does not show area of page margins by default. If any elements are completely or partially clipped by the document edge the displayed area can be extended with this option.boolean value.public void setExportPageMargins(boolean value)
false.
Aspose.Words does not show area of page margins by default. If any elements are completely or partially clipped by the document edge the displayed area can be extended with this option.value - The corresponding boolean value.public boolean getExportRelativeFontSize()
false.
In many existing documents (HTML, IDPF EPUB) font sizes are specified in relative units. This allows applications to adjust text size when viewing/processing documents. For instance, Microsoft Internet Explorer has "View->Text Size" submenu, Adobe Digital Editions has two buttons: Increase/Decrease Text Size. If you expect this functionality to work then set getExportRelativeFontSize() / setExportRelativeFontSize(boolean) property to true.
Aspose Words document model contains and operates only with absolute font size units. Relative units need additional logic to be recalculated from some initial (standard) size. Font size of Normal document style is taken as standard. For instance, if Normal has 12pt font and some text is 18pt then it will be output as 1.5em. to the HTML.
When this option is enabled, document elements other than text will still have absolute sizes. Also some text-related attributes might be expressed absolutely. In particular, line spacing specified with "exactly" rule might produce unwanted results when scaling text. So the source documents should be properly designed and tested when exporting with getExportRelativeFontSize() / setExportRelativeFontSize(boolean) set to true.
boolean value.public void setExportRelativeFontSize(boolean value)
false.
In many existing documents (HTML, IDPF EPUB) font sizes are specified in relative units. This allows applications to adjust text size when viewing/processing documents. For instance, Microsoft Internet Explorer has "View->Text Size" submenu, Adobe Digital Editions has two buttons: Increase/Decrease Text Size. If you expect this functionality to work then set getExportRelativeFontSize() / setExportRelativeFontSize(boolean) property to true.
Aspose Words document model contains and operates only with absolute font size units. Relative units need additional logic to be recalculated from some initial (standard) size. Font size of Normal document style is taken as standard. For instance, if Normal has 12pt font and some text is 18pt then it will be output as 1.5em. to the HTML.
When this option is enabled, document elements other than text will still have absolute sizes. Also some text-related attributes might be expressed absolutely. In particular, line spacing specified with "exactly" rule might produce unwanted results when scaling text. So the source documents should be properly designed and tested when exporting with getExportRelativeFontSize() / setExportRelativeFontSize(boolean) set to true.
value - The corresponding boolean value.public boolean getExportTextInputFormFieldAsText()
false.
When set to true, exports text input form fields as normal text. When false, exports Word text input form fields as INPUT elements in HTML.
When exporting to EPUB, text input form fields are always saved as text due to requirements of this format.
boolean value.public void setExportTextInputFormFieldAsText(boolean value)
false.
When set to true, exports text input form fields as normal text. When false, exports Word text input form fields as INPUT elements in HTML.
When exporting to EPUB, text input form fields are always saved as text due to requirements of this format.
value - The corresponding boolean value.public boolean getExportShapesAsSvg()
Shape nodes are converted to SVG images when saving to HTML, MHTML, EPUB or AZW3. Default value is false.
If this option is set to true, Shape nodes are exported as
boolean value.public void setExportShapesAsSvg(boolean value)
Shape nodes are converted to SVG images when saving to HTML, MHTML, EPUB or AZW3. Default value is false.
If this option is set to true, Shape nodes are exported as
value - The corresponding boolean value.public boolean getExportDropDownFormFieldAsText()
false.
When set to true, exports drop-down form fields as normal text. When false, exports drop-down form fields as SELECT element in HTML.
When exporting to EPUB, text drop-down form fields are always saved as text due to requirements of this format.
boolean value.public void setExportDropDownFormFieldAsText(boolean value)
false.
When set to true, exports drop-down form fields as normal text. When false, exports drop-down form fields as SELECT element in HTML.
When exporting to EPUB, text drop-down form fields are always saved as text due to requirements of this format.
value - The corresponding boolean value.public boolean getExportTocPageNumbers()
false.boolean value.public void setExportTocPageNumbers(boolean value)
false.value - The corresponding boolean value.public boolean getExportXhtmlTransitional()
true, writes a DOCTYPE declaration in the document prior to the root element. Default value is false. When saving to EPUB or HTML5 ( HtmlVersion.HTML_5) the DOCTYPE declaration is always written.
Aspose.Words always writes well formed HTML regardless of this setting.
When true, the beginning of the HTML output document will look like this:
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Aspose.Words aims to output XHTML according to the XHTML 1.0 Transitional specification, but the output will not always validate against the DTD. Some structures inside a Microsoft Word document are hard or impossible to map to a document that will validate against the XHTML schema. For example, XHTML does not allow nested lists (UL cannot be nested inside another UL element), but in Microsoft Word document multilevel lists occur quite often.
boolean value.public void setExportXhtmlTransitional(boolean value)
true, writes a DOCTYPE declaration in the document prior to the root element. Default value is false. When saving to EPUB or HTML5 ( HtmlVersion.HTML_5) the DOCTYPE declaration is always written.
Aspose.Words always writes well formed HTML regardless of this setting.
When true, the beginning of the HTML output document will look like this:
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Aspose.Words aims to output XHTML according to the XHTML 1.0 Transitional specification, but the output will not always validate against the DTD. Some structures inside a Microsoft Word document are hard or impossible to map to a document that will validate against the XHTML schema. For example, XHTML does not allow nested lists (UL cannot be nested inside another UL element), but in Microsoft Word document multilevel lists occur quite often.
value - The corresponding boolean value.public int getHtmlVersion()
HtmlVersion.XHTML.int value. The returned value is one of HtmlVersion constants.public void setHtmlVersion(int value)
HtmlVersion.XHTML.value - The corresponding int value. The value must be one of HtmlVersion constants.public boolean getExportRoundtripInformation()
true for HTML and false for MHTML and EPUB.
Saving of the roundtrip information allows to restore document properties such as tab stops, comments, headers and footers during the HTML documents loading back into a Document object.
When true, the roundtrip information is exported as -aw-* CSS properties of the corresponding HTML elements.
When false, causes no roundtrip information to be output into produced files.
boolean value.public void setExportRoundtripInformation(boolean value)
true for HTML and false for MHTML and EPUB.
Saving of the roundtrip information allows to restore document properties such as tab stops, comments, headers and footers during the HTML documents loading back into a Document object.
When true, the roundtrip information is exported as -aw-* CSS properties of the corresponding HTML elements.
When false, causes no roundtrip information to be output into produced files.
value - The corresponding boolean value.public java.lang.String getResourceFolder()
getResourceFolder() / setResourceFolder(java.lang.String) is the simplest way to specify a folder where all resources should be written. Another way is to use individual properties getFontsFolder() / setFontsFolder(java.lang.String), getImagesFolder() / setImagesFolder(java.lang.String), and getCssStyleSheetFileName() / setCssStyleSheetFileName(java.lang.String).
getResourceFolder() / setResourceFolder(java.lang.String) has a lower priority than folders specified via getFontsFolder() / setFontsFolder(java.lang.String), getImagesFolder() / setImagesFolder(java.lang.String), and getCssStyleSheetFileName() / setCssStyleSheetFileName(java.lang.String). For example, if both getResourceFolder() / setResourceFolder(java.lang.String) and getFontsFolder() / setFontsFolder(java.lang.String) are specified, fonts will be saved to getFontsFolder() / setFontsFolder(java.lang.String), while images and CSS will be saved to getResourceFolder() / setResourceFolder(java.lang.String).
If the folder specified by getResourceFolder() / setResourceFolder(java.lang.String) doesn't exist, it will be created automatically.
String value.getFontsFolder(),
setFontsFolder(java.lang.String),
getImagesFolder(),
setImagesFolder(java.lang.String),
getCssStyleSheetFileName(),
setCssStyleSheetFileName(java.lang.String)public void setResourceFolder(java.lang.String value)
getResourceFolder() / setResourceFolder(java.lang.String) is the simplest way to specify a folder where all resources should be written. Another way is to use individual properties getFontsFolder() / setFontsFolder(java.lang.String), getImagesFolder() / setImagesFolder(java.lang.String), and getCssStyleSheetFileName() / setCssStyleSheetFileName(java.lang.String).
getResourceFolder() / setResourceFolder(java.lang.String) has a lower priority than folders specified via getFontsFolder() / setFontsFolder(java.lang.String), getImagesFolder() / setImagesFolder(java.lang.String), and getCssStyleSheetFileName() / setCssStyleSheetFileName(java.lang.String). For example, if both getResourceFolder() / setResourceFolder(java.lang.String) and getFontsFolder() / setFontsFolder(java.lang.String) are specified, fonts will be saved to getFontsFolder() / setFontsFolder(java.lang.String), while images and CSS will be saved to getResourceFolder() / setResourceFolder(java.lang.String).
If the folder specified by getResourceFolder() / setResourceFolder(java.lang.String) doesn't exist, it will be created automatically.
value - The corresponding String value.getFontsFolder(),
setFontsFolder(java.lang.String),
getImagesFolder(),
setImagesFolder(java.lang.String),
getCssStyleSheetFileName(),
setCssStyleSheetFileName(java.lang.String)public java.lang.String getResourceFolderAlias()
getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) is the simplest way to specify how URIs for all resource files should be constructed. Same information can be specified for images and fonts separately via getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) and getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) properties, respectively. However, there is no individual property for CSS.
getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) has lower priority than getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) and getImagesFolderAlias() / setImagesFolderAlias(java.lang.String). For example, if both getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) and getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) are specified, fonts' URIs will be constructed using getFontsFolderAlias() / setFontsFolderAlias(java.lang.String), while URIs of images and CSS will be constructed using getResourceFolderAlias() / setResourceFolderAlias(java.lang.String).
If getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) is empty, the getResourceFolder() / setResourceFolder(java.lang.String) property value will be used to construct resource URIs.
If getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) is set to '.' (dot), resource URIs will contain file names only, without any path.
String value.getResourceFolder(),
setResourceFolder(java.lang.String),
getFontsFolderAlias(),
setFontsFolderAlias(java.lang.String),
getImagesFolderAlias(),
setImagesFolderAlias(java.lang.String)public void setResourceFolderAlias(java.lang.String value)
getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) is the simplest way to specify how URIs for all resource files should be constructed. Same information can be specified for images and fonts separately via getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) and getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) properties, respectively. However, there is no individual property for CSS.
getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) has lower priority than getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) and getImagesFolderAlias() / setImagesFolderAlias(java.lang.String). For example, if both getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) and getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) are specified, fonts' URIs will be constructed using getFontsFolderAlias() / setFontsFolderAlias(java.lang.String), while URIs of images and CSS will be constructed using getResourceFolderAlias() / setResourceFolderAlias(java.lang.String).
If getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) is empty, the getResourceFolder() / setResourceFolder(java.lang.String) property value will be used to construct resource URIs.
If getResourceFolderAlias() / setResourceFolderAlias(java.lang.String) is set to '.' (dot), resource URIs will contain file names only, without any path.
value - The corresponding String value.getResourceFolder(),
setResourceFolder(java.lang.String),
getFontsFolderAlias(),
setFontsFolderAlias(java.lang.String),
getImagesFolderAlias(),
setImagesFolderAlias(java.lang.String)public java.lang.String getFontsFolder()
When you save a Document in HTML format and getExportFontResources() / setExportFontResources(boolean) is set to true, Aspose.Words needs to save fonts used in the document as standalone files. getFontsFolder() / setFontsFolder(java.lang.String) allows you to specify where the fonts will be saved and getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) allows to specify how the font URIs will be constructed.
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the fonts in the same folder where the document file is saved. Use getFontsFolder() / setFontsFolder(java.lang.String) to override this behavior.
If you save a document into a stream, Aspose.Words does not have a folder where to save the fonts, but still needs to save the fonts somewhere. In this case, you need to specify an accessible folder in the getFontsFolder() / setFontsFolder(java.lang.String) property or provide custom streams via the getFontSavingCallback() / setFontSavingCallback(com.aspose.words.IFontSavingCallback) event handler.
If the folder specified by getFontsFolder() / setFontsFolder(java.lang.String) doesn't exist, it will be created automatically.
getResourceFolder() / setResourceFolder(java.lang.String) is another way to specify a folder where fonts should be saved.
String value.getResourceFolder(),
setResourceFolder(java.lang.String),
getExportFontResources(),
setExportFontResources(boolean),
getFontsFolderAlias(),
setFontsFolderAlias(java.lang.String),
getFontSavingCallback(),
setFontSavingCallback(com.aspose.words.IFontSavingCallback)public void setFontsFolder(java.lang.String value)
When you save a Document in HTML format and getExportFontResources() / setExportFontResources(boolean) is set to true, Aspose.Words needs to save fonts used in the document as standalone files. getFontsFolder() / setFontsFolder(java.lang.String) allows you to specify where the fonts will be saved and getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) allows to specify how the font URIs will be constructed.
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the fonts in the same folder where the document file is saved. Use getFontsFolder() / setFontsFolder(java.lang.String) to override this behavior.
If you save a document into a stream, Aspose.Words does not have a folder where to save the fonts, but still needs to save the fonts somewhere. In this case, you need to specify an accessible folder in the getFontsFolder() / setFontsFolder(java.lang.String) property or provide custom streams via the getFontSavingCallback() / setFontSavingCallback(com.aspose.words.IFontSavingCallback) event handler.
If the folder specified by getFontsFolder() / setFontsFolder(java.lang.String) doesn't exist, it will be created automatically.
getResourceFolder() / setResourceFolder(java.lang.String) is another way to specify a folder where fonts should be saved.
value - The corresponding String value.getResourceFolder(),
setResourceFolder(java.lang.String),
getExportFontResources(),
setExportFontResources(boolean),
getFontsFolderAlias(),
setFontsFolderAlias(java.lang.String),
getFontSavingCallback(),
setFontSavingCallback(com.aspose.words.IFontSavingCallback)public java.lang.String getFontsFolderAlias()
When you save a Document in HTML format and getExportFontResources() / setExportFontResources(boolean) is set to true, Aspose.Words needs to save fonts used in the document as standalone files. getFontsFolder() / setFontsFolder(java.lang.String) allows you to specify where the fonts will be saved and getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) allows to specify how the font URIs will be constructed.
If getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) is not an empty string, then the font URI written to HTML will be FontsFolderAlias + .
If getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) is an empty string, then the font URI written to HTML will be FontsFolder + .
If getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) is set to '.' (dot), then the font file name will be written to HTML without path regardless of other options.
Alternative way to specify the name of the folder to construct font URIs is to use getResourceFolderAlias() / setResourceFolderAlias(java.lang.String).
String value.getResourceFolderAlias(),
setResourceFolderAlias(java.lang.String),
getExportFontResources(),
setExportFontResources(boolean),
getFontsFolder(),
setFontsFolder(java.lang.String),
getFontSavingCallback(),
setFontSavingCallback(com.aspose.words.IFontSavingCallback)public void setFontsFolderAlias(java.lang.String value)
When you save a Document in HTML format and getExportFontResources() / setExportFontResources(boolean) is set to true, Aspose.Words needs to save fonts used in the document as standalone files. getFontsFolder() / setFontsFolder(java.lang.String) allows you to specify where the fonts will be saved and getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) allows to specify how the font URIs will be constructed.
If getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) is not an empty string, then the font URI written to HTML will be FontsFolderAlias + .
If getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) is an empty string, then the font URI written to HTML will be FontsFolder + .
If getFontsFolderAlias() / setFontsFolderAlias(java.lang.String) is set to '.' (dot), then the font file name will be written to HTML without path regardless of other options.
Alternative way to specify the name of the folder to construct font URIs is to use getResourceFolderAlias() / setResourceFolderAlias(java.lang.String).
value - The corresponding String value.getResourceFolderAlias(),
setResourceFolderAlias(java.lang.String),
getExportFontResources(),
setExportFontResources(boolean),
getFontsFolder(),
setFontsFolder(java.lang.String),
getFontSavingCallback(),
setFontSavingCallback(com.aspose.words.IFontSavingCallback)public int getFontResourcesSubsettingSizeThreshold()
0.
getExportFontResources() / setExportFontResources(boolean) allows exporting fonts as subsidiary files or as parts of the output package. If the document uses many fonts, especially with large number of glyphs, then output size can grow significantly. Font subsetting reduces the size of the exported font resource by filtering out glyphs that are not used by the current document.
Font subsetting works as follows:
getFontResourcesSubsettingSizeThreshold() / setFontResourcesSubsettingSizeThreshold(int) to a positive value instructs Aspose.Words to subset fonts which file size is larger than the specified value.
Important! When exporting font resources, font licensing issues should be considered. Authors who want to use specific fonts via a downloadable font mechanism must always carefully verify that their intended use is within the scope of the font license. Many commercial fonts presently do not allow web downloading of their fonts in any form. License agreements that cover some fonts specifically note that usage via @font-face rules in CSS style sheets is not allowed. Font subsetting can also violate license terms.
int value.getExportFontResources(),
setExportFontResources(boolean)public void setFontResourcesSubsettingSizeThreshold(int value)
0.
getExportFontResources() / setExportFontResources(boolean) allows exporting fonts as subsidiary files or as parts of the output package. If the document uses many fonts, especially with large number of glyphs, then output size can grow significantly. Font subsetting reduces the size of the exported font resource by filtering out glyphs that are not used by the current document.
Font subsetting works as follows:
getFontResourcesSubsettingSizeThreshold() / setFontResourcesSubsettingSizeThreshold(int) to a positive value instructs Aspose.Words to subset fonts which file size is larger than the specified value.
Important! When exporting font resources, font licensing issues should be considered. Authors who want to use specific fonts via a downloadable font mechanism must always carefully verify that their intended use is within the scope of the font license. Many commercial fonts presently do not allow web downloading of their fonts in any form. License agreements that cover some fonts specifically note that usage via @font-face rules in CSS style sheets is not allowed. Font subsetting can also violate license terms.
value - The corresponding int value.getExportFontResources(),
setExportFontResources(boolean)public IFontSavingCallback getFontSavingCallback()
IFontSavingCallback value.public void setFontSavingCallback(IFontSavingCallback value)
value - The corresponding IFontSavingCallback value.public java.lang.String getImagesFolder()
When you save a Document in HTML format, Aspose.Words needs to save all images embedded in the document as standalone files. getImagesFolder() / setImagesFolder(java.lang.String) allows you to specify where the images will be saved and getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) allows to specify how the image URIs will be constructed.
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the images in the same folder where the document file is saved. Use getImagesFolder() / setImagesFolder(java.lang.String) to override this behavior.
If you save a document into a stream, Aspose.Words does not have a folder where to save the images, but still needs to save the images somewhere. In this case, you need to specify an accessible folder in the getImagesFolder() / setImagesFolder(java.lang.String) property or provide custom streams via the getImageSavingCallback() / setImageSavingCallback(com.aspose.words.IImageSavingCallback) event handler.
If the folder specified by getImagesFolder() / setImagesFolder(java.lang.String) doesn't exist, it will be created automatically.
getResourceFolder() / setResourceFolder(java.lang.String) is another way to specify a folder where images should be saved.
String value.getResourceFolder(),
setResourceFolder(java.lang.String),
getImagesFolderAlias(),
setImagesFolderAlias(java.lang.String),
getImageSavingCallback(),
setImageSavingCallback(com.aspose.words.IImageSavingCallback)public void setImagesFolder(java.lang.String value)
When you save a Document in HTML format, Aspose.Words needs to save all images embedded in the document as standalone files. getImagesFolder() / setImagesFolder(java.lang.String) allows you to specify where the images will be saved and getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) allows to specify how the image URIs will be constructed.
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the images in the same folder where the document file is saved. Use getImagesFolder() / setImagesFolder(java.lang.String) to override this behavior.
If you save a document into a stream, Aspose.Words does not have a folder where to save the images, but still needs to save the images somewhere. In this case, you need to specify an accessible folder in the getImagesFolder() / setImagesFolder(java.lang.String) property or provide custom streams via the getImageSavingCallback() / setImageSavingCallback(com.aspose.words.IImageSavingCallback) event handler.
If the folder specified by getImagesFolder() / setImagesFolder(java.lang.String) doesn't exist, it will be created automatically.
getResourceFolder() / setResourceFolder(java.lang.String) is another way to specify a folder where images should be saved.
value - The corresponding String value.getResourceFolder(),
setResourceFolder(java.lang.String),
getImagesFolderAlias(),
setImagesFolderAlias(java.lang.String),
getImageSavingCallback(),
setImageSavingCallback(com.aspose.words.IImageSavingCallback)public java.lang.String getImagesFolderAlias()
When you save a Document in HTML format, Aspose.Words needs to save all images embedded in the document as standalone files. getImagesFolder() / setImagesFolder(java.lang.String) allows you to specify where the images will be saved and getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) allows to specify how the image URIs will be constructed.
If getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) is not an empty string, then the image URI written to HTML will be ImagesFolderAlias +
If getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) is an empty string, then the image URI written to HTML will be ImagesFolder +
If getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) is set to '.' (dot), then the image file name will be written to HTML without path regardless of other options.
Alternative way to specify the name of the folder to construct image URIs is to use getResourceFolderAlias() / setResourceFolderAlias(java.lang.String).
String value.getResourceFolderAlias(),
setResourceFolderAlias(java.lang.String),
getImagesFolder(),
setImagesFolder(java.lang.String),
getImageSavingCallback(),
setImageSavingCallback(com.aspose.words.IImageSavingCallback)public void setImagesFolderAlias(java.lang.String value)
When you save a Document in HTML format, Aspose.Words needs to save all images embedded in the document as standalone files. getImagesFolder() / setImagesFolder(java.lang.String) allows you to specify where the images will be saved and getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) allows to specify how the image URIs will be constructed.
If getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) is not an empty string, then the image URI written to HTML will be ImagesFolderAlias +
If getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) is an empty string, then the image URI written to HTML will be ImagesFolder +
If getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) is set to '.' (dot), then the image file name will be written to HTML without path regardless of other options.
Alternative way to specify the name of the folder to construct image URIs is to use getResourceFolderAlias() / setResourceFolderAlias(java.lang.String).
value - The corresponding String value.getResourceFolderAlias(),
setResourceFolderAlias(java.lang.String),
getImagesFolder(),
setImagesFolder(java.lang.String),
getImageSavingCallback(),
setImageSavingCallback(com.aspose.words.IImageSavingCallback)public int getImageResolution()
96 dpi.
This property effects raster images when getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is true and effects metafiles exported as raster images. Some image properties such as cropping or rotation require saving transformed images and in this case transformed images are created in the given resolution.
int value.getScaleImageToShapeSize(),
setScaleImageToShapeSize(boolean)public void setImageResolution(int value)
96 dpi.
This property effects raster images when getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is true and effects metafiles exported as raster images. Some image properties such as cropping or rotation require saving transformed images and in this case transformed images are created in the given resolution.
value - The corresponding int value.getScaleImageToShapeSize(),
setScaleImageToShapeSize(boolean)public IImageSavingCallback getImageSavingCallback()
IImageSavingCallback value.public void setImageSavingCallback(IImageSavingCallback value)
value - The corresponding IImageSavingCallback value.public boolean getScaleImageToShapeSize()
true.
An image in a Microsoft Word document is a shape. The shape has a size and the image has its own size. The sizes are not directly linked. For example, the image can be 1024x786 pixels, but shape that displays this image can be 400x300 points.
In order to display an image in the browser, it must be scaled to the shape size. The getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) property controls where the scaling of the image takes place: in Aspose.Words during export to HTML or in the browser when displaying the document.
When getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is true, the image is scaled by Aspose.Words using high quality scaling during export to HTML. When getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is false, the image is output with its original size and the browser has to scale it.
In general, browsers do quick and poor quality scaling. As a result, you will normally get better display quality in the browser and smaller file size when getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is true, but better printing quality and faster conversion when getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is false.
boolean value.getImageResolution(),
setImageResolution(int)public void setScaleImageToShapeSize(boolean value)
true.
An image in a Microsoft Word document is a shape. The shape has a size and the image has its own size. The sizes are not directly linked. For example, the image can be 1024x786 pixels, but shape that displays this image can be 400x300 points.
In order to display an image in the browser, it must be scaled to the shape size. The getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) property controls where the scaling of the image takes place: in Aspose.Words during export to HTML or in the browser when displaying the document.
When getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is true, the image is scaled by Aspose.Words using high quality scaling during export to HTML. When getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is false, the image is output with its original size and the browser has to scale it.
In general, browsers do quick and poor quality scaling. As a result, you will normally get better display quality in the browser and smaller file size when getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is true, but better printing quality and faster conversion when getScaleImageToShapeSize() / setScaleImageToShapeSize(boolean) is false.
value - The corresponding boolean value.getImageResolution(),
setImageResolution(int)public int getTableWidthOutputMode()
HtmlElementSizeOutputMode.ALL.
In the HTML format, table, row and cell elements (
When you convert a document to HTML using Aspose.Words, you might want to control how table, row and cell widths are exported to affect how the resulting document is displayed in the visual agent (e.g. a browser or viewer).
Use this property as a filter to specify what table widths values are exported into the destination document. For example, if you are converting a document to EPUB and intend to view the document on a mobile reading device, then you probably want to avoid exporting absolute width values. To do this you need to specify the output mode
In the HTML format, table, row and cell elements (
When you convert a document to HTML using Aspose.Words, you might want to control how table, row and cell widths are exported to affect how the resulting document is displayed in the visual agent (e.g. a browser or viewer).
Use this property as a filter to specify what table widths values are exported into the destination document. For example, if you are converting a document to EPUB and intend to view the document on a mobile reading device, then you probably want to avoid exporting absolute width values. To do this you need to specify the output mode
If value is set to
If value is set to
If value is set to
If value is set to
This option affects only documents being saved to MHTML.
By default, resources in MHTML documents are referenced by file name (for example, "image.png"), which are matched against "Content-Location" headers of MIME parts.
This option enables an alternative method, where references to resource files are written as CID (Content-ID) URLs (for example, "cid:image.png") and are matched against "Content-ID" headers.
In theory, there should be no difference between the two referencing methods and either of them should work fine in any browser or mail agent. In practice, however, some agents fail to fetch resources by file name. If your browser or mail agent refuses to load resources included in an MTHML document (doesn't show images or doesn't load CSS styles), try exporting the document with CID URLs.
This option affects only documents being saved to MHTML.
By default, resources in MHTML documents are referenced by file name (for example, "image.png"), which are matched against "Content-Location" headers of MIME parts.
This option enables an alternative method, where references to resource files are written as CID (Content-ID) URLs (for example, "cid:image.png") and are matched against "Content-ID" headers.
In theory, there should be no difference between the two referencing methods and either of them should work fine in any browser or mail agent. In practice, however, some agents fail to fetch resources by file name. If your browser or mail agent refuses to load resources included in an MTHML document (doesn't show images or doesn't load CSS styles), try exporting the document with CID URLs.
By default, this option is set to
If this option is set to
By default, this option is set to
If this option is set to ,
, , ) can have their widths specified either in relative (percentage) or in absolute units. In a document in Aspose.Words, tables, rows and cells can have their widths specified using either relative or absolute units too.
HtmlElementSizeOutputMode.RELATIVE_ONLY or HtmlElementSizeOutputMode.NONE so the viewer on the mobile device can layout the table to fit the width of the screen as best as it can.
int value. The returned value is one of HtmlElementSizeOutputMode constants.
setTableWidthOutputMode
public void setTableWidthOutputMode(int value)
HtmlElementSizeOutputMode.ALL.
,
, , ) can have their widths specified either in relative (percentage) or in absolute units. In a document in Aspose.Words, tables, rows and cells can have their widths specified using either relative or absolute units too.
HtmlElementSizeOutputMode.RELATIVE_ONLY or HtmlElementSizeOutputMode.NONE so the viewer on the mobile device can layout the table to fit the width of the screen as best as it can.
value - The corresponding int value. The value must be one of HtmlElementSizeOutputMode constants.
getOfficeMathOutputMode
public int getOfficeMathOutputMode()
HtmlOfficeMathOutputMode.Image.
int value. The returned value is one of HtmlOfficeMathOutputMode constants.
setOfficeMathOutputMode
public void setOfficeMathOutputMode(int value)
HtmlOfficeMathOutputMode.Image.
value - The corresponding int value. The value must be one of HtmlOfficeMathOutputMode constants.
getExportOriginalUrlForLinkedImages
public boolean getExportOriginalUrlForLinkedImages()
false.
true ImageData.getSourceFullName() / ImageData.setSourceFullName(java.lang.String) value is used as the URL of linked images and linked images are not loaded into document's folder or getImagesFolder() / setImagesFolder(java.lang.String).
false linked images are loaded into document's folder or getImagesFolder() / setImagesFolder(java.lang.String) and URL of each linked image is constructed depending on document's folder, getImagesFolder() / setImagesFolder(java.lang.String) and getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) properties.
boolean value.
setExportOriginalUrlForLinkedImages
public void setExportOriginalUrlForLinkedImages(boolean value)
false.
true ImageData.getSourceFullName() / ImageData.setSourceFullName(java.lang.String) value is used as the URL of linked images and linked images are not loaded into document's folder or getImagesFolder() / setImagesFolder(java.lang.String).
false linked images are loaded into document's folder or getImagesFolder() / setImagesFolder(java.lang.String) and URL of each linked image is constructed depending on document's folder, getImagesFolder() / setImagesFolder(java.lang.String) and getImagesFolderAlias() / setImagesFolderAlias(java.lang.String) properties.
value - The corresponding boolean value.
getExportCidUrlsForMhtmlResources
public boolean getExportCidUrlsForMhtmlResources()
false.
boolean value.
setExportCidUrlsForMhtmlResources
public void setExportCidUrlsForMhtmlResources(boolean value)
false.
value - The corresponding boolean value.
getResolveFontNames
public boolean getResolveFontNames()
Document.getFontSettings() / Document.setFontSettings(com.aspose.words.FontSettings) when being written into HTML-based formats.
false and font family names are written to HTML as specified in source documents. That is, Document.getFontSettings() / Document.setFontSettings(com.aspose.words.FontSettings) are ignored and no resolution or substitution of font family names is performed.
true, Aspose.Words uses Document.getFontSettings() / Document.setFontSettings(com.aspose.words.FontSettings) to resolve each font family name specified in a source document into the name of an available font family, performing font substitution as required.
boolean value.
setResolveFontNames
public void setResolveFontNames(boolean value)
Document.getFontSettings() / Document.setFontSettings(com.aspose.words.FontSettings) when being written into HTML-based formats.
false and font family names are written to HTML as specified in source documents. That is, Document.getFontSettings() / Document.setFontSettings(com.aspose.words.FontSettings) are ignored and no resolution or substitution of font family names is performed.
true, Aspose.Words uses Document.getFontSettings() / Document.setFontSettings(com.aspose.words.FontSettings) to resolve each font family name specified in a source document into the name of an available font family, performing font substitution as required.
value - The corresponding boolean value.
memberwiseClone
protected java.lang.Object memberwiseClone()