←Select platform

GetOptions Method

Summary

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

Syntax

C#
VB
Java
Objective-C
WinRT C#
C++
public DocumentOptions GetOptions( 
   DocumentFormat format 
) 
- (LTDocumentOptions *)optionsForFormat:(LTDocumentFormat)format 
public DocumentOptions getOptions(DocumentFormat format) 
 function Leadtools.Forms.DocumentWriters.DocumentWriter.GetOptions(  
   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 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.Text TextDocumentOptions
DocumentFormat.Html HtmlDocumentOptions
DocumentFormat.Emf EmfDocumentOptions
DocumentFormat.Xps XpsDocumentOptions
DocumentFormat.Docx DocxDocumentOptions
DocumentFormat.Xls XlsDocumentOptions
DocumentFormat.Pub PubDocumentOptions
DocumentFormat.Mob MobDocumentOptions
DocumentFormat.Svg SvgDocumentOptions
DocumentFormat.AltoXml AltoXmlDocumentOptions

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.
Example

For an example, refer to DocumentWriter.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms.DocumentWriters Assembly