TX Text Control .NET Server

SaveSettings Class

Class
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll
Inherits
  1. LoadSaveSettingsBase
  2. SaveSettings

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 : LoadSaveSettingsBase

Examples

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);

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);

Members

Constructors

ConstructorDescription
SaveSettingsNot described in the reference. public SaveSettings();

Properties

PropertyDescription
AuthorSets the document's author which will be saved in the document.
BytesWrittenGets the number of bytes written during a save operation.
CreationDateSets the document's creation date which will be saved in the document.
CreatorApplicationSets the application, which has created the document.
CssFileNameHTML only. Sets the path and filename of a CSS file belonging to a HTML document.
CssSaveModeHTML only. Specifies how to save stylesheet data with a HTML document.
DefaultStreamTypeDetermines the default StreamType used in the file Open... and file Save As... dialogboxes. (Inherited from LoadSaveSettingsBase.)
DigitalSignatureSpecifies 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.
DocumentAccessPermissionsSpecifies 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.
DocumentBasePathSets a base path saved in the document that is used to resolve relative file paths. (Inherited from LoadSaveSettingsBase.)
DocumentKeywordsSets the document's keywords which will be saved in the document.
DocumentLevelJavaScriptActionsSpecifies 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.
DocumentSubjectSets the document's subject string which will be saved in the document.
DocumentTitleSets the document's title that will be saved in the document.
EmbeddedFilesSpecifies 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.)
ImageCompressionQualitySets 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.
ImageExportFilterIndexSets 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.
ImageMaxResolutionSets 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.
ImageSaveModeDetermines 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.
ImageSavePathSets 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.
LastModificationDateSets the date the document is last modified.
MasterPasswordSpecifies 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.)
OmittedContentSpecifies data to be omitted when the document is saved.
PageMarginsSets the margins saved for the document's pages.
PageSizeSets the width and height saved for the document's pages.
ReportingMergeBlockFormatSpecifies 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.)
SavedFileRead 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.
SaveDocumentBackColorSpecifies whether or not the document background color is saved. By default it is saved.
SavedStreamTypeRead only. Gets the StreamType of the file that has been saved.
SignatureFieldsSpecifies 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.
UserDefinedDocumentPropertiesSets 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.
UserPasswordSpecifies 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

EnumerationDescription
DialogSettingsDetermines additional options in a file Save As... dialogbox. It contains the following values: