Here is a complete code that performs the conversion:
Document doc = new Document(filename);
// save the document in Aspose.Pdf.Xml format into a memory stream.
MemoryStream stream = new MemoryStream();
doc.Save(stream, SaveFormat.FormatAsposePdf);
// seek to the beginning so it can be read by XmlDocument.
stream.Seek(0, SeekOrigin.Begin);
// load the document into an XmlDocument
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(stream);
// load the XML document into Aspose.Pdf
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
// make sure the images that were saved by Aspose.Word into Windows temporary
// folder are automatically deleted by Aspose.Pdf when they are no longer needed.
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.BindXML(xmlDoc, null);
// cache true type fonts to increase speed
pdf.IsTruetypeFontMapCached = true;
pdf.TruetypeFontMapPath = Path.GetTempPath();
// now produce the PDF file.
pdf.Save(System.IO.Path.GetFileNameWithoutExtension(filename) + ".pdf");
As you can see the format type to save as document as Xml for Pdf is actually called:
SaveFormat.FormatAsposePdf