SaveOutputParameters Class

This object is returned to the caller after a document is saved and contains additional information that has been generated or calculated during the save operation. The caller can use or ignore this object.

ExpandedInheritance Hierarchy


Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 21.3.0


public class SaveOutputParameters

The SaveOutputParameters type exposes the following members.


Public propertyCode exampleContentType
Returns the Content-Type string (Internet Media Type) that identifies the type of the saved document.


Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)


Shows how to access output parameters of a document's save operation.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Hello world!");

// After we save a document, we can access the Internet Media Type (MIME type) of the newly created output document.
SaveOutputParameters parameters = doc.Save(ArtifactsDir + "Document.SaveOutputParameters.doc");

Assert.AreEqual("application/msword", parameters.ContentType);

// This property changes depending on the save format.
parameters = doc.Save(ArtifactsDir + "Document.SaveOutputParameters.pdf");

Assert.AreEqual("application/pdf", parameters.ContentType);

ExpandedSee Also