Loading TOC...


   doc as Node,
   filename as String,
   [options as Object?]
) as Sequence


Converts a Microsoft Powerpoint document to XHTML. Returns several nodes, including a parts node, the converted document xml node, and any other document parts (for example, css files and images). The first node is the parts node, which contains a manifest of all of the parts generated as result of the conversion. Does not convert Microsoft Office 2007 and later documents.

doc Microsoft Powerpoint document to convert to HTML, as binary node().
filename The root for the name of the converted files and directories. If the specified filename includes an extension, then the extension is appended to the root with an underscore. The directory for other parts of the conversion (images, for example) has the string "_parts" appended to the root. For example, if you specify a filename of "myFile.ppt", the generated names will be "myFile_ppt.xhtml" for the xml node and "myFile_ppt_parts" for the directory containing the any other parts generated by the conversion (images, css files, and so on).
options Options with which to customize this operation. This function supports the following options, plus the options from the xdmp.tidy function.
Specify true to run tidy on the document and false not to run tidy. If you run tidy, you can also include xdmp.tidy options.
Specify true to produce "compact" HTML, that is, without style information. The default is false.
An integer specifying which slide of the input Powerpoint document to convert. If this option is not set, all slides are converted.
Specify true to produce one document for each slide. The default is false.
Specify true to include speaker notes in the output. The default is false.

Usage Notes

This function is part of a separate package which may generate temporary files. These temporary files are not supported by encryption at rest.

This function is not available on Mac OS X.

This function requires separate converter installation package starting with release 9.0-4, see MarkLogic Converters Installation Changes Starting at Release 9.0-4 in the Installation Guide for All Platforms.

This function supports the following file formats: Microsoft PowerPoint 97/2000/2001 (Mac)/XP/2003, except that 95/97 compound file format is not supported.

The convert functions return several nodes. The first node is a manifest containing the various parts of the conversion. Typically there will be an xml part, a css part, and some image parts. Each part is returned as a separate node in the order shown in the manifest.

Therefore, given the following manifest:


the first node of the returned query is the manifest, the second is the "myFile_ppt.xhtml" node, the third is the "myFile_ppt_parts/conv.css" node, and the fourth is the myFile_ppt_parts/toc.xml node.


const results = xdmp.powerpointConvert(
const it = results[Symbol.iterator]();
const manifest= it.next().value;
const pptAsXHTML = it.next().value;

// The powerpoint document converted as xhtml.  The results variable
// is a Sequence, where the first item is the manifest, and the 
// remaining items are the converted nodes.


// Using a combinary of xdmp.powerpointConvert and xdmp.tidy options.
const results = Array.from(
    { tidy: true, clean: 'yes', speakerNotes: true }
const manifest = results[0];
const parts = results.slice(1);

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.