# SaveSettings Class

> The SaveSettings class provides properties for advanced settings and information during save operations. See the TextControl.Save method for more information.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Inherits:** `TXTextControl.LoadSaveSettingsBase`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > SaveSettings Class
- **3268 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/llms-full.txt

---

### Description

The SaveSettings class provides properties for advanced settings and information during save operations. See the [TextControl.Save](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/save-method/llms-full.txt) method for more information.

### Syntax

```csharp
public sealed class SaveSettings : LoadSaveSettingsBase
```

```vbnet
Public NotInheritable Class SaveSettings
    Inherits LoadSaveSettingsBase
```

### Examples

The following example shows how to use the SaveSettings to create a password protected PDF document.

```csharp
TXTextControl.SaveSettings save = new TXTextControl.SaveSettings();
save.UserPassword = "TX Text Control";

textControl1.Save("test.pdf", TXTextControl.StreamType.AdobePDF, save);
```

```vbnet
Dim save As TXTextControl.SaveSettings = New TXTextControl.SaveSettings()
save.UserPassword = "TX Text Control"

TextControl1.Save("test.pdf", TXTextControl.StreamType.AdobePDF, save)
```

The following example configures how the current document is exported to WordprocessingML.

```csharp
textControl.Text = "Quarterly results";
SaveSettings saveSettings = new();
textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings);
```

```vbnet
textControl.Text = "Quarterly results"
Dim saveSettings As New SaveSettings()
textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings)
```

---

## In This Section

- [SaveSettings.Author Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/author-property/llms-full.txt): Sets the document's author which will be saved in the document.
- [SaveSettings.BytesWritten Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/byteswritten-property/llms-full.txt): Gets the number of bytes written during a save operation.
- [SaveSettings.CreationDate Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/creationdate-property/llms-full.txt): Sets the document's creation date which will be saved in the document.
- [SaveSettings.CreatorApplication Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/creatorapplication-property/llms-full.txt): Sets the application, which has created the document.
- [SaveSettings.CssFileName Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/cssfilename-property/llms-full.txt): HTML only. Sets the path and filename of a CSS file belonging to a HTML document.
- [SaveSettings.CssSaveMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/csssavemode-property/llms-full.txt): HTML only. Specifies how to save stylesheet data with a HTML document.
- [SaveSettings.DialogSettings Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/dialogsettings-enumeration/llms-full.txt): Determines additional options in a file Save As... dialogbox. It contains the following values:
- [SaveSettings.DigitalSignature Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/digitalsignature-property/llms-full.txt): Specifies a DigitalSignature object, which defines an X.509 certificate. This certificate can be used to digitally sign a PDF or a PDF/A file. For other formats this property has no meaning.
- [SaveSettings.DocumentAccessPermissions Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/documentaccesspermissions-property/llms-full.txt): Specifies how a document can be accessed after it has been opened. This property has only an effect if also a password has been specified with the SaveSettings.MasterPassword property. If no password has been specified the document can be accessed without any restrictions. The property's value can be a bitwise combination of more than one of the described values.
- [SaveSettings.DocumentKeywords Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/documentkeywords-property/llms-full.txt): Sets the document's keywords which will be saved in the document.
- [SaveSettings.DocumentLevelJavaScriptActions Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/documentleveljavascriptactions-property/llms-full.txt): Specifies an array of strings containing Javascript. The scripts are embedded in a PDF document at document level and they are executed, when the PDF document is opened. When the document is saved as PDF/A the scripts are not embedded.
- [SaveSettings.DocumentSubject Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/documentsubject-property/llms-full.txt): Sets the document's subject string which will be saved in the document.
- [SaveSettings.DocumentTitle Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/documenttitle-property/llms-full.txt): Sets the document's title that will be saved in the document.
- [SaveSettings.ImageCompressionQuality Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/imagecompressionquality-property/llms-full.txt): Sets a value between 1 and 100, which is the quality of a lossy image compression used when a document is saved. It is used for all images in the document the data of which is compressed with a lossy compression algorithm. A value of 100 indicates the maximum quality, a value of 1 indicates the minimum quality. A value of zero selects a compression specific default value. For a single image the value of this property can be overwritten using the Image.ExportCompressionQuality property.
- [SaveSettings.ImageExportFilterIndex Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/imageexportfilterindex-property/llms-full.txt): Sets the format used for saving all images contained in the document. This is the number of the filter in the string returned through the ImageCollection.ExportFilters property, beginning with number one. If the ImageCollection.ExportFilters property is used to initialize the FileDialog.Filter property of a Framework dialog, the FileDialog.FilterIndex property can be used as value for this property. A value of zero indicates that the original format of each image is used. The original format can be obtained with the Image.FilterIndex property. For a single image the value of this property can be overwritten with the Image.ExportFilterIndex property. The technical article Loading and Saving Images describes how images can be loaded and saved.
- [SaveSettings.ImageMaxResolution Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/imagemaxresolution-property/llms-full.txt): Sets the maximum resolution for all images in the document in dots per inch when the document is saved. If an image's resolution is larger than this property's value it is reduced otherwise it is not changed. If this property's value is zero, which is the default value, the default resolution of each image is used. For a single image the value of this property can be overwritten using the Image.ExportMaxResolution property.
- [SaveSettings.ImageSaveMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/imagesavemode-property/llms-full.txt): Determines whether the document's images are stored through its data or through its file reference. By default images are stored through a file reference, when a file reference exists. Otherwise, if an image has been pasted from the clipboard, it is stored with its binary data. For a single image the value of this property can be overwritten with the Image.SaveMode property. The technical article Loading and Saving Images gives an overview how to export images.
- [SaveSettings.ImageSavePath Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/imagesavepath-property/llms-full.txt): Sets a file path that is used to save resources like images when images are saved as file link. If this location does not exists it is generated.
- [SaveSettings.LastModificationDate Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/lastmodificationdate-property/llms-full.txt): Sets the date the document is last modified.
- [SaveSettings.OmittedContent Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/omittedcontent-property/llms-full.txt): Specifies data to be omitted when the document is saved.
- [SaveSettings.PageMargins Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/pagemargins-property/llms-full.txt): Sets the margins saved for the document's pages.
- [SaveSettings.PageSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/pagesize-property/llms-full.txt): Sets the width and height saved for the document's pages.
- [SaveSettings.SavedFile Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/savedfile-property/llms-full.txt): Read only. Gets the name and path of the file that has been saved. It is set to an empty string, if text has been saved in a byte array or as a string.
- [SaveSettings.SaveDocumentBackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/savedocumentbackcolor-property/llms-full.txt): Specifies whether or not the document background color is saved. By default it is saved.
- [SaveSettings.SavedStreamType Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/savedstreamtype-property/llms-full.txt): Read only. Gets the StreamType of the file that has been saved.
- [SaveSettings.SignatureFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/signaturefields-property/llms-full.txt): Specifies an array of DigitalSignature objects, each of which defines an X.509 certificate and is associated with a SignatureField in the document. These certificates can be used to digitally sign a PDF or a PDF/A file. For other formats this property has no meaning. To associate a certificate with a signature field a name must be specified for the field.
- [SaveSettings.UserDefinedDocumentProperties Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/userdefineddocumentproperties-property/llms-full.txt): Sets a dictionary with all user-defined document properties which will be saved in the document. The property's value must be an object of the type UserDefinedPropertyDictionary.

---

## Nearby

- **Previous:** [RulerBar.ScaleUnit Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/scaleunit-property/llms-full.txt)
- **Next:** [SaveSettings.Author Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/author-property/llms-full.txt)
