Click or drag to resize
DocumentModelSave Method (String)
Saves the document to a file with the specified path. Path must include file extension.

Namespace: GemBox.Document
Assembly: GemBox.Document (in GemBox.Document.dll) Version: 25.3.30.1231
Syntax
public void Save(
	string path
)

Parameters

path
Type: SystemString
The path to which to save the document.
Exceptions
ExceptionCondition
InvalidOperationExceptionIf file extension is not specified or not supported. If file extension is not recognized, use Save(String, SaveOptions) method overload instead.
Remarks
File extension that is extracted from the path is used to create the appropriate SaveOptions derived class instance that is then passed to the Save(String, SaveOptions) method.

Following file extensions are supported:

  • Microsoft Word: .docx, .docm, .dotm, .dotx
  • Portable Document Format: .pdf
  • XML Paper Specification: .xps
  • HyperText Markup Language: .htm, .html, .mht, .mhtml
  • Rich Text Format: .rtf
  • Plain Text: .txt
  • Image: .bmp, .gif, .jpg, .jpeg, .png, .tif, .tiff, .wdp
See Also