←Select platform

GetOptions Method

Summary
Gets the extra options to use when saving a document using the specified format.
Syntax
C#
VB
Objective-C
C++
Java
public DocumentOptions GetOptions( 
   DocumentFormat format 
) 
Public Function GetOptions( _ 
   ByVal format As DocumentFormat _ 
) As DocumentOptions 
- (LTDocumentOptions *)optionsForFormat:(LTDocumentFormat)format 
public DocumentOptions getOptions(DocumentFormat format) 
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.

Remarks

You cannot use the DocumentOptions class directly. Instead, use one of the derived classes to get and set the options associated with that 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.Xps XpsDocumentOptions
DocumentFormat.Docx DocxDocumentOptions
DocumentFormat.Xls XpsDocumentOptions
DocumentFormat.AltoXml AltoXmlDocumentOptions

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

  1. Call the DocumentWriter.GetOptions method for the DocumentWriter object being used, passing the DocumentFormat to be used in the format parameter. The resulting object from the base DocumentOptions class needs to be cast to the appropriate derived class described in the previous table.
  2. Use the various derived class properties to change the options.
  3. Call 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

Help Version 21.0.2021.6.30
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.Writer Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.