LEADTOOLS Forms (Leadtools.Forms.DocumentWriters assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
GetOptions Method
See Also 
Leadtools.Forms.DocumentWriters Namespace > DocumentWriter Class : GetOptions Method



format
The document format.

The GetOptions Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

format
The document format.
Gets the extra options to use when saving a document using the specified format.

Syntax

Visual Basic (Declaration) 
Public Function GetOptions( _
   ByVal format As DocumentFormat _
) As DocumentOptions
Visual Basic (Usage)Copy Code
Dim instance As DocumentWriter
Dim format As DocumentFormat
Dim value As DocumentOptions
 
value = instance.GetOptions(format)
C# 
public DocumentOptions GetOptions( 
   DocumentFormat format
)
C++/CLI 
public:
DocumentOptions^ GetOptions( 
   DocumentFormat format
) 

Parameters

format
The document format.

Return Value

The document options for this format. Note that the returned object from the base DocumentOptions class needs to be cast to one of the derived classes based on format.

Example

For an example, refer to DocumentWriter.

Remarks

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 lists the document formats and the DocumentOptions derived class associated with it:

Format (the value of format) Class
DocumentFormat.Ltd LtdDocumentOptions
DocumentFormat.Pdf PdfDocumentOptions
DocumentFormat.Doc DocDocumentOptions
DocumentFormat.Rtf RtfDocumentOptions
DocumentFormat.Html HtmlDocumentOptions
DocumentFormat.Text TextDocumentOptions
DocumentFormat.Emf EmfDocumentOptions
DocumentFormat.Text TextDocumentOptions

To change the options used with a particular format, perform the following steps:

  1. Use the DocumentWriter.GetOptions method of the DocumentWriter being used, 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.
  2. Use the various derived class properties to change the options.
  3. Use DocumentWriter.SetOptions to set the new options in the engine.
  4. 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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Forms.DocumentWriters requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features