LEADTOOLS Forms (Leadtools.Forms.DocumentWriters assembly)

SetOptions Method

Show in webframe







The document format.
An instance of an object that implements IDocumentOptions. The remarks section lists the various document formats and the derived object that can be used.
Sets the extra options to use when saving a document using the specified format.
Syntax
public void SetOptions( 
   DocumentFormat format,
   IDocumentOptions options
)
'Declaration
 
Public Sub SetOptions( _
   ByVal format As DocumentFormat, _
   ByVal options As IDocumentOptions _
) 
'Usage
 
Dim instance As DocumentWriter
Dim format As DocumentFormat
Dim options As IDocumentOptions
 
instance.SetOptions(format, options)
public void SetOptions( 
   DocumentFormat format,
   IDocumentOptions options
)

            

            
 function Leadtools.Forms.DocumentWriters.DocumentWriter.SetOptions( 
   format ,
   options 
)
public:
void SetOptions( 
   DocumentFormat format,
   IDocumentOptions^ options
) 

Parameters

format
The document format.
options
An instance of an object that implements IDocumentOptions. The remarks section lists the various document formats and the derived object that can be used.
Remarks

You cannot use the IDocumentOptions 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 IDocumentOptions implementation 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 object you are using passing DocumentFormat desired in to the format parameter. Note that the resulting object from the IDocumentOptions interface 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.
Example
For an example, refer to DocumentWriter.
Requirements

Target Platforms

See Also

Reference

DocumentWriter Class
DocumentWriter Members
DocumentPage Structure
DocumentFormat Enumeration
Programming with LEADTOOLS Document Writers
Files to be Included with Your Application
Unlocking Special LEAD Features

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.

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