Supported Document Formats

Contents
[ ]

The following table indicates the file formats supported by Aspose.Words for C++:

Format Description Load Save Remarks
DOC Microsoft Word 97 – 2007 Document tick tick
DOT Microsoft Word 97 – 2007 Template tick tick
DocPreWord60 The document is in the Word 6 or Word 95 format tick
DOCX Office Open XML WordprocessingML Document (macro-free) tick tick
DOCM Office Open XML WordprocessingML Macro-Enabled Document tick tick
DOTX Office Open XML WordprocessingML Template (macro-free) tick tick
DOTM Office Open XML WordprocessingML Macro-Enabled Template tick tick
XLSX XML-based file format for representing spreadsheets tick
FlatOpc Office Open XML WordprocessingML stored in a flat XML file instead of a ZIP package tick tick
FlatOpcMacroEnabled Office Open XML WordprocessingML Macro-Enabled Document stored in a flat XML file instead of a ZIP package tick tick
FlatOpcTemplate Office Open XML WordprocessingML Template (macro-free) stored in a flat XML file instead of a ZIP package tick tick
FlatOpcTemplateMacroEnabled Office Open XML WordprocessingML Macro-Enabled Template stored in a flat XML file instead of a ZIP package tick tick
XML XML document tick
RTF RTF format tick tick
WordML Microsoft Word 2003 WordprocessingML format tick tick
PDF  Saves the document as PDF (Adobe Portable Document) format tick
EPS  Encapsulated Postscript file format tick
XPS Saves the document in the XPS (XML Paper Specification) format. tick
XamlFixed Saves the document in the Extensible Application Markup Language (XAML) package format tick
SVG Saves the document in the SVG (Scalable Vector Graphics) format tick
HtmlFixed Saves the document in the HTML format using absolutely positioned elements tick
OpenXPS Saves the document in the OpenXPS (Ecma-388) format. tick
PS Saves the document in the PS (PostScript) format tick
PCL Saves the document in the PCL (Printer Control Language) format tick
HTML HTML or XHTML format tick tick
MHTML MHTML (Web archive) format tick tick
EPUB IDPF EPUB format tick tick
ODT  ODF Text Document tick tick
OTT  ODF Text Document Template tick tick
TXT Plain Text tick tick
MOBI eBook format used by the MobiPocket Reader and Amazon Kindle Readers tick tick
AZW3 eBook format used by Amazon Kindle readers tick tick
CHM CHM (Compiled HTML Help) format tick  
XamlFlow Beta
Saves the document in the Extensible Application Markup Language (XAML) format as a flow document
tick
XamlFlowPack Beta
Saves the document in the Extensible Application Markup Language (XAML) package format as a flow document
tick
MD Markdown Document tick tick
TIFF Renders a page or pages of the document and saves them into a single or multipage TIFF file tick
PNG Renders a page of the document and saves it as a PNG file tick
BMP Renders a page of the document and saves it as a BMP file tick
EMF Renders a page of the document and saves it as a vector EMF (Enhanced Meta File) file tick
JPEG Renders a page of the document and saves it as a JPEG file tick
GIF Renders a page of the document and saves it as a GIF file tick

FAQ

  1. Q: Which document formats can Aspose.Words for C++ both load and save?
    A: Aspose.Words for C++ can load formats such as DOC, DOCX, DOCM, DOT, DOTX, DOTM, RTF, XML, MD, HTML, and many others. It can save to all loadable formats plus PDF, XPS, SVG, EPS, PS, PCL, various image formats (PNG, JPEG, TIFF, etc.), and e‑book formats like EPUB, MOBI, and AZW3. The table above shows the exact load/save support for each format.

  2. Q: Can I convert a Markdown (.md) file to a Word document (.docx) using Aspose.Words for C++?
    A: Yes. Load the Markdown file with Document doc("input.md"); and then save it as DOCX: doc->Save("output.docx");. The conversion preserves headings, lists, tables, and basic formatting supported by the Markdown parser.

  3. Q: How do I generate a PDF from C++ code with Aspose.Words?
    A: Create a Document object, optionally modify it, and call Save with the PDF extension:

    System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>("input.docx");
    doc->Save("output.pdf");
    

    The library automatically handles font embedding and layout conversion.

  4. Q: Is it possible to convert RTF to HTML while keeping the original formatting (e.g., header text rotation)?
    A: Yes. Load the RTF file and save it as HTML:

    System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>("input.rtf");
    doc->Save("output.html");
    

    Aspose.Words preserves most formatting, including rotated text, tables, and styles. For fine‑tuned control, use HtmlSaveOptions to adjust CSS handling.

  5. Q: Are there any limitations when converting to or from e‑book formats such as MOBI or AZW3?
    A: Conversion to MOBI and AZW3 is supported for saving only; these formats cannot be loaded. When saving, complex Word features (e.g., advanced tables, certain WordArt) may be simplified to fit the e‑book specifications. Use EpubSaveOptions or MobiSaveOptions to control image quality and metadata.