Aspose::Words::Saving::SaveOutputParameters class

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. To learn more, visit the Save a Document documentation article.

class SaveOutputParameters : public System::Object

Methods

MethodDescription
get_ContentType() constReturns the Content-Type string (Internet Media Type) that identifies the type of the saved document.
GetType() const override
Is(const System::TypeInfo&) const override
static Type()

Examples

Shows how to access output parameters of a document’s save operation.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(u"Hello world!");

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

ASSERT_EQ(u"application/msword", parameters->get_ContentType());

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

ASSERT_EQ(u"application/pdf", parameters->get_ContentType());

See Also