←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
PublicFunctionGetOptions( _ByValformatAsDocumentFormat_)AsDocumentOptions
- (LTDocumentOptions *)optionsForFormat:(LTDocumentFormat)format
publicDocumentOptions getOptions(DocumentFormatformat)

Parameters

format
The document format.

Return Value

The document options for this format. Note that the returned object from the baseDocumentOptionsclass needs to be cast to one of the derived classes based onformat.

Remarks

You cannot use theDocumentOptionsclass 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 theDocumentOptionsderived class associated with it:

Format (the value offormat) 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 theDocumentWriterobject being used, passing theDocumentFormatto be used in theformatparameter. The resulting object from the baseDocumentOptionsclass 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. CallDocumentWriter.SetOptionsto set the new options in the engine.
  4. Now you can call theDocumentWriter.BeginDocumentmethod (with the desiredDocumentFormatfor theformatparameter) to create a new document and add the pages.
Example

For an example, refer toDocumentWriter.

Requirements

Target Platforms

Leadtools.Document.Writer Assembly
188金宝搏的网址客服|Support|Contact Us|Intellectual Property Notices
© 1991-2021LEAD Technologies, Inc.All Rights Reserved.