SaveFormat
Inheritance: java.lang.Object
public class SaveFormat
Indicates the format in which the document is saved.
Examples:
Shows how to convert from DOCX to HTML format.
Document doc = new Document(getMyDir() + "Document.docx");
doc.save(getArtifactsDir() + "Document.ConvertToHtml.html", SaveFormat.HTML);
M:Aspose.Words.Document.Save(System.IO.Stream,Aspose.Words.SaveFormat)
Fields
Field | Description |
---|---|
AZW_3 | Saves the document in the AZW3 format. |
BMP | Renders a page of the document and saves it as a BMP file. |
DOC | Saves the document in the Microsoft Word 97 - 2007 Document format. |
DOCM | Saves the document as an Office Open XML WordprocessingML Macro-Enabled Document. |
DOCX | Saves the document as an Office Open XML WordprocessingML Document (macro-free). |
DOT | Saves the document in the Microsoft Word 97 - 2007 Template format. |
DOTM | Saves the document as an Office Open XML WordprocessingML Macro-Enabled Template. |
DOTX | Saves the document as an Office Open XML WordprocessingML Template (macro-free). |
EMF | Renders a page of the document and saves it as a vector EMF (Enhanced Meta File) file. |
EPS | Renders a page of the document and saves it as an EPS file. |
EPUB | Saves the document in the EPUB format. |
FLAT_OPC | Saves the document as an Office Open XML WordprocessingML stored in a flat XML file instead of a ZIP package. |
FLAT_OPC_MACRO_ENABLED | Saves the document as an Office Open XML WordprocessingML Macro-Enabled Document stored in a flat XML file instead of a ZIP package. |
FLAT_OPC_TEMPLATE | Saves the document as an Office Open XML WordprocessingML Template (macro-free) stored in a flat XML file instead of a ZIP package. |
FLAT_OPC_TEMPLATE_MACRO_ENABLED | Saves the document as an Office Open XML WordprocessingML Macro-Enabled Template stored in a flat XML file instead of a ZIP package. |
GIF | Renders a page of the document and saves it as a GIF file. |
HTML | Saves the document in the HTML format. |
HTML_FIXED | Saves the document in the HTML format using absolutely positioned elements |
JPEG | Renders a page of the document and saves it as a JPEG file. |
MARKDOWN | Saves the document in the Markdown format. |
MHTML | Saves the document in the MHTML (Web archive) format. |
MOBI | Saves the document in the MOBI format. |
ODT | Saves the document as an ODF Text Document. |
OPEN_XPS | Saves the document in the OpenXPS (Ecma-388) format. |
OTT | Saves the document as an ODF Text Document Template. |
PCL | Saves the document in the PCL (Printer Control Language) format. |
Saves the document as PDF (Adobe Portable Document) format. | |
PNG | Renders a page of the document and saves it as a PNG file. |
PS | Saves the document in the PS (PostScript) format. |
RTF | Saves the document in the RTF format. |
SVG | Saves the document in the Svg (Scalable Vector Graphics) format. |
TEXT | Saves the document in the plain text format. |
TIFF | Renders a page or pages of the document and saves them into a single or multipage TIFF file. |
UNKNOWN | Default, invalid value for file format. |
WEB_P | Renders a page of the document and saves it as a WebP file. |
WORD_ML | Saves the document in the Microsoft Word 2003 WordprocessingML format. |
XAML_FIXED | Saves the document in the Extensible Application Markup Language (XAML) format as a fixed document. |
XAML_FLOW | Beta. Saves the document in the Extensible Application Markup Language (XAML) format as a flow document. |
XAML_FLOW_PACK | Beta. Saves the document in the Extensible Application Markup Language (XAML) package format as a flow document. |
XLSX | Saves the document as an Office Open XML SpreadsheetML Document (macro-free). |
XPS | Saves the document in the XPS (XML Paper Specification) format. |
length |
Methods
Method | Description |
---|---|
fromName(String saveFormatName) | |
getName(int saveFormat) | |
getValues() | |
toString(int saveFormat) |
AZW_3
public static int AZW_3
Saves the document in the AZW3 format.
BMP
public static int BMP
Renders a page of the document and saves it as a BMP file.
DOC
public static int DOC
Saves the document in the Microsoft Word 97 - 2007 Document format.
DOCM
public static int DOCM
Saves the document as an Office Open XML WordprocessingML Macro-Enabled Document.
DOCX
public static int DOCX
Saves the document as an Office Open XML WordprocessingML Document (macro-free).
DOT
public static int DOT
Saves the document in the Microsoft Word 97 - 2007 Template format.
DOTM
public static int DOTM
Saves the document as an Office Open XML WordprocessingML Macro-Enabled Template.
DOTX
public static int DOTX
Saves the document as an Office Open XML WordprocessingML Template (macro-free).
EMF
public static int EMF
Renders a page of the document and saves it as a vector EMF (Enhanced Meta File) file.
EPS
public static int EPS
Renders a page of the document and saves it as an EPS file.
EPUB
public static int EPUB
Saves the document in the EPUB format.
FLAT_OPC
public static int FLAT_OPC
Saves the document as an Office Open XML WordprocessingML stored in a flat XML file instead of a ZIP package.
FLAT_OPC_MACRO_ENABLED
public static int FLAT_OPC_MACRO_ENABLED
Saves the document as an Office Open XML WordprocessingML Macro-Enabled Document stored in a flat XML file instead of a ZIP package.
FLAT_OPC_TEMPLATE
public static int FLAT_OPC_TEMPLATE
Saves the document as an Office Open XML WordprocessingML Template (macro-free) stored in a flat XML file instead of a ZIP package.
FLAT_OPC_TEMPLATE_MACRO_ENABLED
public static int FLAT_OPC_TEMPLATE_MACRO_ENABLED
Saves the document as an Office Open XML WordprocessingML Macro-Enabled Template stored in a flat XML file instead of a ZIP package.
GIF
public static int GIF
Renders a page of the document and saves it as a GIF file.
HTML
public static int HTML
Saves the document in the HTML format.
HTML_FIXED
public static int HTML_FIXED
Saves the document in the HTML format using absolutely positioned elements
JPEG
public static int JPEG
Renders a page of the document and saves it as a JPEG file.
MARKDOWN
public static int MARKDOWN
Saves the document in the Markdown format.
MHTML
public static int MHTML
Saves the document in the MHTML (Web archive) format.
MOBI
public static int MOBI
Saves the document in the MOBI format.
ODT
public static int ODT
Saves the document as an ODF Text Document.
OPEN_XPS
public static int OPEN_XPS
Saves the document in the OpenXPS (Ecma-388) format.
OTT
public static int OTT
Saves the document as an ODF Text Document Template.
PCL
public static int PCL
Saves the document in the PCL (Printer Control Language) format.
public static int PDF
Saves the document as PDF (Adobe Portable Document) format.
PNG
public static int PNG
Renders a page of the document and saves it as a PNG file.
PS
public static int PS
Saves the document in the PS (PostScript) format.
RTF
public static int RTF
Saves the document in the RTF format. All characters above 7-bits are escaped as hexadecimal or Unicode characters.
SVG
public static int SVG
Saves the document in the Svg (Scalable Vector Graphics) format.
TEXT
public static int TEXT
Saves the document in the plain text format.
TIFF
public static int TIFF
Renders a page or pages of the document and saves them into a single or multipage TIFF file.
UNKNOWN
public static int UNKNOWN
Default, invalid value for file format.
WEB_P
public static int WEB_P
Renders a page of the document and saves it as a WebP file.
WORD_ML
public static int WORD_ML
Saves the document in the Microsoft Word 2003 WordprocessingML format.
XAML_FIXED
public static int XAML_FIXED
Saves the document in the Extensible Application Markup Language (XAML) format as a fixed document.
XAML_FLOW
public static int XAML_FLOW
Beta. Saves the document in the Extensible Application Markup Language (XAML) format as a flow document.
XAML_FLOW_PACK
public static int XAML_FLOW_PACK
Beta. Saves the document in the Extensible Application Markup Language (XAML) package format as a flow document.
XLSX
public static int XLSX
Saves the document as an Office Open XML SpreadsheetML Document (macro-free).
XPS
public static int XPS
Saves the document in the XPS (XML Paper Specification) format.
length
public static int length
fromName(String saveFormatName)
public static int fromName(String saveFormatName)
Parameters:
Parameter | Type | Description |
---|---|---|
saveFormatName | java.lang.String |
Returns: int
getName(int saveFormat)
public static String getName(int saveFormat)
Parameters:
Parameter | Type | Description |
---|---|---|
saveFormat | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int saveFormat)
public static String toString(int saveFormat)
Parameters:
Parameter | Type | Description |
---|---|---|
saveFormat | int |
Returns: java.lang.String