The SetOptions Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.
- format
- The document format.
- options
- An instance of an object derived from DocumentOptions. The remarks section lists the various document formats and the derived object that can be used.
Visual Basic (Declaration) | |
---|---|
Public Sub SetOptions( _ ByVal format As DocumentFormat, _ ByVal options As DocumentOptions _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As DocumentWriter Dim format As DocumentFormat Dim options As DocumentOptions instance.SetOptions(format, options) |
C# | |
---|---|
public void SetOptions( DocumentFormat format, DocumentOptions options ) |
C++/CLI | |
---|---|
public: void SetOptions( DocumentFormat format, DocumentOptions^ options ) |
Parameters
- format
- The document format.
- options
- An instance of an object derived from DocumentOptions. The remarks section lists the various document formats and the derived object that can be used.
For an example, refer to DocumentWriter.
You cannot use the DocumentOptions class directly. Instead, use one of the derived classes to get and set the options associated with a document format. The following table list the document formats and the DocumentOptions derived class associated with it:
To change the options used with a particular format, perform the following steps:
- Use the DocumentWriter.GetOptions method of the DocumentWriter object you are using passing DocumentFormat desired in to the format parameter. Note that the resulting object from the base DocumentOptions class needs to be cast to appropriate derived class described in the table above.
- Use the various derived class properties to change the options.
- Use DocumentWriter.SetOptions to set the new options in the engine.
- Now you can call the DocumentWriter.BeginDocument method (with the desired DocumentFormat for the format parameter) to create a new document and add the pages.
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7