public class CssSavingArgs
extends java.lang.Object
ICssSavingCallback.cssSaving(com.aspose.words.CssSavingArgs) event.
To learn more, visit the Save a Document documentation article.
By default, when Aspose.Words saves a document to HTML, it saves CSS information inline (as a value of the style attribute on every element).
CssSavingArgs allows to save CSS information into file by providing your own stream object.
To save CSS into stream, use the P:Aspose.Words.Saving.CssSavingArgs.CssStream property.
To suppress saving CSS into a file and embedding to HTML document use the isExportNeeded() / isExportNeeded(boolean) property.
| Modifier and Type | Method and Description |
|---|---|
java.io.OutputStream |
getCssStream() |
Document |
getDocument()
Gets the document object that is currently being saved.
|
boolean |
getKeepCssStreamOpen()
Specifies whether Aspose.Words should keep the stream open or close it after saving an CSS information.
|
boolean |
isExportNeeded()
Allows to specify whether the CSS will be exported to file and embedded to HTML document.
|
void |
isExportNeeded(boolean value)
Allows to specify whether the CSS will be exported to file and embedded to HTML document.
|
void |
setCssStream(java.io.OutputStream value) |
void |
setKeepCssStreamOpen(boolean value)
Specifies whether Aspose.Words should keep the stream open or close it after saving an CSS information.
|
public Document getDocument()
public boolean getKeepCssStreamOpen()
Default is false and Aspose.Words will close the stream you provided in the P:Aspose.Words.Saving.CssSavingArgs.CssStream property after writing an CSS information into it. Specify true to keep the stream open.
boolean value.public void setKeepCssStreamOpen(boolean value)
Default is false and Aspose.Words will close the stream you provided in the P:Aspose.Words.Saving.CssSavingArgs.CssStream property after writing an CSS information into it. Specify true to keep the stream open.
value - The corresponding boolean value.public java.io.OutputStream getCssStream()
public void setCssStream(java.io.OutputStream value)
public boolean isExportNeeded()
true. When this property is false, the CSS information will not be saved to a CSS file and will not be embedded to HTML document.boolean value.public void isExportNeeded(boolean value)
true. When this property is false, the CSS information will not be saved to a CSS file and will not be embedded to HTML document.value - The corresponding boolean value.