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

FieldDescription
AZW_3Saves the document in the AZW3 format.
BMPRenders a page of the document and saves it as a BMP file.
DOCSaves the document in the Microsoft Word 97 - 2007 Document format.
DOCMSaves the document as an Office Open XML WordprocessingML Macro-Enabled Document.
DOCXSaves the document as an Office Open XML WordprocessingML Document (macro-free).
DOTSaves the document in the Microsoft Word 97 - 2007 Template format.
DOTMSaves the document as an Office Open XML WordprocessingML Macro-Enabled Template.
DOTXSaves the document as an Office Open XML WordprocessingML Template (macro-free).
EMFRenders a page of the document and saves it as a vector EMF (Enhanced Meta File) file.
EPSRenders a page of the document and saves it as an EPS file.
EPUBSaves the document in the EPUB format.
FLAT_OPCSaves the document as an Office Open XML WordprocessingML stored in a flat XML file instead of a ZIP package.
FLAT_OPC_MACRO_ENABLEDSaves the document as an Office Open XML WordprocessingML Macro-Enabled Document stored in a flat XML file instead of a ZIP package.
FLAT_OPC_TEMPLATESaves 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_ENABLEDSaves the document as an Office Open XML WordprocessingML Macro-Enabled Template stored in a flat XML file instead of a ZIP package.
GIFRenders a page of the document and saves it as a GIF file.
HTMLSaves the document in the HTML format.
HTML_FIXEDSaves the document in the HTML format using absolutely positioned elements
JPEGRenders a page of the document and saves it as a JPEG file.
MARKDOWNSaves the document in the Markdown format.
MHTMLSaves the document in the MHTML (Web archive) format.
MOBISaves the document in the MOBI format.
ODTSaves the document as an ODF Text Document.
OPEN_XPSSaves the document in the OpenXPS (Ecma-388) format.
OTTSaves the document as an ODF Text Document Template.
PCLSaves the document in the PCL (Printer Control Language) format.
PDFSaves the document as PDF (Adobe Portable Document) format.
PNGRenders a page of the document and saves it as a PNG file.
PSSaves the document in the PS (PostScript) format.
RTFSaves the document in the RTF format.
SVGSaves the document in the Svg (Scalable Vector Graphics) format.
TEXTSaves the document in the plain text format.
TIFFRenders a page or pages of the document and saves them into a single or multipage TIFF file.
UNKNOWNDefault, invalid value for file format.
WEB_PRenders a page of the document and saves it as a WebP file.
WORD_MLSaves the document in the Microsoft Word 2003 WordprocessingML format.
XAML_FIXEDSaves the document in the Extensible Application Markup Language (XAML) format as a fixed document.
XAML_FLOWBeta. Saves the document in the Extensible Application Markup Language (XAML) format as a flow document.
XAML_FLOW_PACKBeta. Saves the document in the Extensible Application Markup Language (XAML) package format as a flow document.
XLSXSaves the document as an Office Open XML SpreadsheetML Document (macro-free).
XPSSaves the document in the XPS (XML Paper Specification) format.
length

Methods

MethodDescription
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.

PDF

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:

ParameterTypeDescription
saveFormatNamejava.lang.String

Returns: int

getName(int saveFormat)

public static String getName(int saveFormat)

Parameters:

ParameterTypeDescription
saveFormatint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int saveFormat)

public static String toString(int saveFormat)

Parameters:

ParameterTypeDescription
saveFormatint

Returns: java.lang.String