Click or drag to resize
Converter Class
Public API of XMLmind XSL-FO Converter for .NET
An XSL-FO converter.
Inheritance Hierarchy
SystemObject
  XmlMind.FoConverterConverter

Namespace: XmlMind.FoConverter
Assembly: xfc-api (in xfc-api.dll) Version: 6.3.0
Syntax
public class Converter

The Converter type exposes the following members.

Constructors
  NameDescription
Public methodConverter
Creates a new instance of the Converter class.
Top
Properties
  NameDescription
Public propertyAlwaysSaveAsPNG
Specifies whether JPEG images are always transcoded to PNG.
Public propertyBaseUrl
The base URL of relative paths in attribute values.
Public propertyDetectLists
Specifies whether proper lists should be created by inferring the numbering style of the list from the label of its first item.
Public propertyDocxVariant
Marks generated DOCX files as being compatible with MS-Word having specified major version.
Public propertyEastAsiaFontFamilies
May be used to map East Asian font families to Western font families.
Public propertyEditRestrictions
Specifies how the generated document is to be restricted in terms of editing and/or formatting.
Public propertyGenericFontFamilies
May be used to map generic font families to actual font families.
Public propertyImageRendererResolution
Default image resolution in DPI, according to the image renderer.
Public propertyImageResolution
Default image resolution in DPI.
Public propertyOutputEncoding
The conversion output encoding.
Public propertyOutputFormat
The conversion output format.
Public propertyPrescaleImages
The image scaling policy.
Public propertyScreenResolution
Screen resolution in DPI.
Public propertySingleSidedLayout
A page layout specifier.
Public propertyTargetViewer
The target RTF viewer.
Public propertyUnprotectPassword
This clear text password lets the user of the word processor remove the edit restrictions.
Public propertyUserStyles
Specifies the location of an XML file containing the set of user styles to be used during the conversion.
Public propertyUseVML
Specifies whether images contained in Office Open XML (.docx) files should be represented using deprecated VML markup rather than using DrawingML markup.
Top
Methods
  NameDescription
Public methodConvert
Performs the conversion.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetErrorHandler
Returns the registered error handler.
Public methodGetHashCode (Inherited from Object.)
Public methodGetInput
Returns specified input.
Public methodGetOutput
Returns specified output.
Public methodGetType (Inherited from Object.)
Public methodGetUriResolver
Returns the registered URI resolver.
Public methodStatic memberListEncodings
Lists the available encodings for the specified output format.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodStatic memberParseEditRestrictions
Parses edit restrictions specified as a string.
Public methodSetDocumentMeta
Add, replace or remove specified document metadata.
Public methodSetErrorHandler
Registers an error handler.
Public methodSetInput(Stream)
Sets the conversion input source.
Public methodSetInput(TextReader)
Sets the conversion input source.
Public methodSetInput(String)
Sets the conversion input source.
Public methodSetInput(XmlReader)
Sets the conversion input source.
Public methodSetOutput(Stream)
Sets the conversion output destination.
Public methodSetOutput(TextWriter)
Sets the conversion output destination.
Public methodSetOutput(String)
Sets the conversion output destination.
Public methodSetUriResolver
Registers a URI resolver.
Public methodToString (Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberCOMMENTS_ONLY
Edit restriction: no changes are permitted, but comments can be inserted.
Public fieldStatic memberFILL_FORMS_ONLY
Edit restriction: no changes are permitted, but data can be entered into forms.
Public fieldStatic memberLIMIT_FORMATTING
No direct formatting (e.g. "Bold", "Italic") and limit formatting to a selection of styles.
Public fieldStatic memberREAD_ONLY
Edit restriction: no changes are permitted; the document is read-only.
Public fieldStatic memberTRACKED_CHANGES_ONLY
Edit restriction: all changes are permitted, but they're automatically tracked.
Public fieldStatic memberUNRESTRICTED
No edit restrictions.
Top
Remarks
The Converter class implements the XSL-FO conversion engine. Performing a conversion typically involves the following steps:
  1. Set conversion parameters such as output format and encoding. All conversion parameters are implemented as public properties.
  2. Specify the conversion input source using one of the SetInput methods. The input source may be specified as a URL, a byte stream, a character stream or an XML reader.
  3. Specify the conversion output destination using one of the SetOutput methods. The output destination may be specified as a file name, a byte stream or a character stream.
  4. Perform the conversion by calling the Convert method.
Examples
The method below converts an XSL-FO file to WML, writing the conversion output to the standard output stream.
public void Convert(string input) 
{
    Converter converter = new Converter();
    converter.OutputFormat = OutputFormat.Wml;
    converter.SetInput(input);
    converter.SetOutput(System.Console.Out);
    converter.Convert();
}
See Also