SaveSettings Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
- Inherits
- Load
Save Settings Base - Save
Settings
- Load
Description
The SaveSettings class provides properties for advanced settings and information during save operations. See the TextControl.Save method for more information.
Syntax
public sealed class SaveSettings : LoadSaveSettingsBasePublic NotInheritable Class SaveSettings
Inherits LoadSaveSettingsBaseExamples
The following example shows how to use the SaveSettings to create a password protected PDF document.
TXTextControl.SaveSettings save = new TXTextControl.SaveSettings();
save.UserPassword = "TX Text Control";
textControl1.Save("test.pdf", TXTextControl.StreamType.AdobePDF, save);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.
textControl.Text = "Quarterly results";
SaveSettings saveSettings = new();
textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings);textControl.Text = "Quarterly results"
Dim saveSettings As New SaveSettings()
textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings)Members
Constructors
| Constructor | Description |
|---|---|
| SaveSettings | Not described in the reference. public SaveSettings(); |
Properties
| Property | Description |
|---|---|
| Author | Sets the document's author which will be saved in the document. |
| BytesWritten | Gets the number of bytes written during a save operation. |
| CreationDate | Sets the document's creation date which will be saved in the document. |
| CreatorApplication | Sets the application, which has created the document. |
| CssFileName | HTML only. Sets the path and filename of a CSS file belonging to a HTML document. |
| CssSaveMode | HTML only. Specifies how to save stylesheet data with a HTML document. |
| DefaultStreamType | Determines the default StreamType used in the file Open... and file Save As... dialogboxes. (Inherited from LoadSaveSettingsBase.) |
| DigitalSignature | 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. |
| DocumentAccessPermissions | 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. |
| DocumentBasePath | Sets a base path saved in the document that is used to resolve relative file paths. (Inherited from LoadSaveSettingsBase.) |
| DocumentKeywords | Sets the document's keywords which will be saved in the document. |
| DocumentLevelJavaScriptActions | 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. |
| DocumentSubject | Sets the document's subject string which will be saved in the document. |
| DocumentTitle | Sets the document's title that will be saved in the document. |
| EmbeddedFiles | Specifies an array of EmbeddedFile objects which will be embedded in the saved document. Each file must be specified through a name and its data. (Inherited from LoadSaveSettingsBase.) |
| ImageCompressionQuality | 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. |
| ImageExportFilterIndex | 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. |
| ImageMaxResolution | 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. |
| ImageSaveMode | 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. |
| ImageSavePath | 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. |
| LastModificationDate | Sets the date the document is last modified. |
| MasterPassword | Specifies a password for the document's access permissions. If the password is an empty string, accessing the document is not restricted. If a password is specified, the access permissions are given through the SaveSettings.DocumentAccessPermissions property. (Inherited from LoadSaveSettingsBase.) |
| OmittedContent | Specifies data to be omitted when the document is saved. |
| PageMargins | Sets the margins saved for the document's pages. |
| PageSize | Sets the width and height saved for the document's pages. |
| ReportingMergeBlockFormat | Specifies how reporting merge blocks are handled when a document is saved. Reporting merge blocks can be saved in a document either through special document targets represented through DocumentTarget objects or through special subtextparts represented through SubTextPart objects. When a merge block is marked with document targets, the name of the starting marker begins with blockstart_ and the name of the ending marker begins with blockend_. When a merge block is marked through a subtextpart, its name begins with txmb_. (Inherited from LoadSaveSettingsBase.) |
| SavedFile | 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. |
| SaveDocumentBackColor | Specifies whether or not the document background color is saved. By default it is saved. |
| SavedStreamType | Read only. Gets the StreamType of the file that has been saved. |
| SignatureFields | 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. |
| UserDefinedDocumentProperties | 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. |
| UserPassword | Specifies the password for the user when the document is reopened. If the password is an empty string the document can be reopened by every user. (Inherited from LoadSaveSettingsBase.) |
Enumerations
| Enumeration | Description |
|---|---|
| DialogSettings | Determines additional options in a file Save As... dialogbox. It contains the following values: |