com.aspose.words

Class SaveFormat

  • java.lang.Object
    • com.aspose.words.SaveFormat
public class SaveFormat 
extends java.lang.Object

Utility class containing constants. Indicates the format in which the document is saved.

Example:

Converts from DOC to HTML format.
Document doc = new Document(getMyDir() + "Document.doc");

doc.save(getMyDir() + "\\Artifacts\\Document.ConvertToHtml.html", SaveFormat.HTML);
See Also:
Document.save(java.io.OutputStream,int), SaveOptions

Field Summary
static final intUNKNOWN = 0
Default, invalid value for file format.
static final intDOC = 10
Saves the document in the Microsoft Word 97 - 2007 Document format.
static final intDOT = 11
Saves the document in the Microsoft Word 97 - 2007 Template format.
static final intDOCX = 20
Saves the document as an Office Open XML WordprocessingML Document (macro-free).
static final intDOCM = 21
Saves the document as an Office Open XML WordprocessingML Macro-Enabled Document.
static final intDOTX = 22
Saves the document as an Office Open XML WordprocessingML Template (macro-free).
static final intDOTM = 23
Saves the document as an Office Open XML WordprocessingML Macro-Enabled Template.
static final intFLAT_OPC = 24
Saves the document as an Office Open XML WordprocessingML stored in a flat XML file instead of a ZIP package.
static final intFLAT_OPC_MACRO_ENABLED = 25
Saves the document as an Office Open XML WordprocessingML Macro-Enabled Document stored in a flat XML file instead of a ZIP package.
static final intFLAT_OPC_TEMPLATE = 26
Saves the document as an Office Open XML WordprocessingML Template (macro-free) stored in a flat XML file instead of a ZIP package.
static final intFLAT_OPC_TEMPLATE_MACRO_ENABLED = 27
Saves the document as an Office Open XML WordprocessingML Macro-Enabled Template stored in a flat XML file instead of a ZIP package.
static final intRTF = 30
Saves the document in the RTF format. All characters above 7-bits are escaped as hexadecimal or Unicode characters.
static final intWORD_ML = 31
Saves the document in the Microsoft Word 2003 WordprocessingML format.
static final intPDF = 40
Saves the document as PDF (Adobe Portable Document) format.
static final intXPS = 41
Saves the document in the XPS (XML Paper Specification) format.
static final intXAML_FIXED = 42
Saves the document in the Extensible Application Markup Language (XAML) format as a fixed document.
static final intSVG = 44
Saves the document in the Svg (Scalable Vector Graphics) format.
static final intHTML_FIXED = 45
Saves the document in the HTML format using absolutely positioned elements
static final intOPEN_XPS = 46
Saves the document in the OpenXPS (Ecma-388) format.
static final intPS = 47
Saves the document in the PS (PostScript) format.
static final intPCL = 48
Saves the document in the PCL (Printer Control Language) format.
static final intHTML = 50
Saves the document in the HTML format.
static final intMHTML = 51
Saves the document in the MHTML (Web archive) format.
static final intEPUB = 52
Saves the document in the IDPF EPUB format.
static final intODT = 60
Saves the document as an ODF Text Document.
static final intOTT = 61
Saves the document as an ODF Text Document Template.
static final intTEXT = 70
Saves the document in the plain text format.
static final intXAML_FLOW = 71
Beta. Saves the document in the Extensible Application Markup Language (XAML) format as a flow document.
static final intXAML_FLOW_PACK = 72
Beta. Saves the document in the Extensible Application Markup Language (XAML) package format as a flow document.
static final intTIFF = 100
Renders a page or pages of the document and saves them into a single or multipage TIFF file.
static final intPNG = 101
Renders a page of the document and saves it as a PNG file.
static final intBMP = 102
Renders a page of the document and saves it as a BMP file.
static final intEMF = 103
Renders a page of the document and saves it as a vector EMF (Enhanced Meta File) file.
static final intJPEG = 104
Renders a page of the document and saves it as a JPEG file.
static final intGIF = 105
Renders a page of the document and saves it as a GIF file.
 

    • Field Detail

      • UNKNOWN = 0

        public static final int UNKNOWN
        Default, invalid value for file format.
      • DOC = 10

        public static final int DOC
        Saves the document in the Microsoft Word 97 - 2007 Document format.
      • DOT = 11

        public static final int DOT
        Saves the document in the Microsoft Word 97 - 2007 Template format.
      • DOCX = 20

        public static final int DOCX
        Saves the document as an Office Open XML WordprocessingML Document (macro-free).
      • DOCM = 21

        public static final int DOCM
        Saves the document as an Office Open XML WordprocessingML Macro-Enabled Document.
      • DOTX = 22

        public static final int DOTX
        Saves the document as an Office Open XML WordprocessingML Template (macro-free).
      • DOTM = 23

        public static final int DOTM
        Saves the document as an Office Open XML WordprocessingML Macro-Enabled Template.
      • FLAT_OPC = 24

        public static final 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 = 25

        public static final 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 = 26

        public static final 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 = 27

        public static final 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.
      • RTF = 30

        public static final int RTF
        Saves the document in the RTF format. All characters above 7-bits are escaped as hexadecimal or Unicode characters.
      • WORD_ML = 31

        public static final int WORD_ML
        Saves the document in the Microsoft Word 2003 WordprocessingML format.
      • PDF = 40

        public static final int PDF
        Saves the document as PDF (Adobe Portable Document) format.
      • XPS = 41

        public static final int XPS
        Saves the document in the XPS (XML Paper Specification) format.
      • XAML_FIXED = 42

        public static final int XAML_FIXED
        Saves the document in the Extensible Application Markup Language (XAML) format as a fixed document.
      • SVG = 44

        public static final int SVG
        Saves the document in the Svg (Scalable Vector Graphics) format.
      • HTML_FIXED = 45

        public static final int HTML_FIXED
        Saves the document in the HTML format using absolutely positioned elements
      • OPEN_XPS = 46

        public static final int OPEN_XPS
        Saves the document in the OpenXPS (Ecma-388) format.
      • PS = 47

        public static final int PS
        Saves the document in the PS (PostScript) format.
      • PCL = 48

        public static final int PCL
        Saves the document in the PCL (Printer Control Language) format.
      • HTML = 50

        public static final int HTML
        Saves the document in the HTML format.
      • MHTML = 51

        public static final int MHTML
        Saves the document in the MHTML (Web archive) format.
      • EPUB = 52

        public static final int EPUB
        Saves the document in the IDPF EPUB format.
      • ODT = 60

        public static final int ODT
        Saves the document as an ODF Text Document.
      • OTT = 61

        public static final int OTT
        Saves the document as an ODF Text Document Template.
      • TEXT = 70

        public static final int TEXT
        Saves the document in the plain text format.
      • XAML_FLOW = 71

        public static final int XAML_FLOW
        Beta. Saves the document in the Extensible Application Markup Language (XAML) format as a flow document.
      • XAML_FLOW_PACK = 72

        public static final int XAML_FLOW_PACK
        Beta. Saves the document in the Extensible Application Markup Language (XAML) package format as a flow document.
      • TIFF = 100

        public static final int TIFF
        Renders a page or pages of the document and saves them into a single or multipage TIFF file.
      • PNG = 101

        public static final int PNG
        Renders a page of the document and saves it as a PNG file.
      • BMP = 102

        public static final int BMP
        Renders a page of the document and saves it as a BMP file.
      • EMF = 103

        public static final int EMF
        Renders a page of the document and saves it as a vector EMF (Enhanced Meta File) file.
      • JPEG = 104

        public static final int JPEG
        Renders a page of the document and saves it as a JPEG file.
      • GIF = 105

        public static final int GIF
        Renders a page of the document and saves it as a GIF file.