This first sample consists in a single step: invoke XMLmind XSL-FO Converter to convert the input XSL-FO file to RTF.
Note that converting XSL-FO to other formats is simply a matter of changing the value of the OutputFormat property. The possible values for this property are: OutputFormat.Rtf
, OutputFormat.Wml
, OutputFormat.Docx
, OutputFormat.Odt
.
Excerpts of samples/dotnet/Sample1.cs
:
using XmlMind.FoConverter; ... Converter converter = new Converter(); converter.OutputFormat = OutputFormat.Rtf; converter.OutputEncoding = "windows-1252"; converter.ImageResolution = 120; String inUri = ToUri(inPath); converter.SetInput(inUri); converter.SetOutput(outPath); converter.Convert(); ...
Create a new Converter object. | ||||
Parameterize the Note that specifying property | ||||
Specify the input source of the Here we use the most high-level specification: we specify a (%-escaped) URI. In production, you'll generally specify a
| ||||
Specify the output destination of the Here we use the most high-level specification: we specify a file path. In production, you'll generally specify a | ||||
Perform the conversion by invoking Converter.Convert. |