Converter.Convert
Convert(string, string)
Converts the given input document into the output document using specified input output file names and its extensions.
public static void Convert(string inputFile, string outputFile)
Parameter | Type | Description |
---|---|---|
inputFile | String | The input file name. |
outputFile | String | The output file name. |
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Examples
Shows how to convert DOCX document to PDF.
Converter.Convert(MyDir + "Simple.docx", ArtifactsDir + "Converter.ConvertToPdf.pdf");
See Also
- class Converter
- namespace Wordize.Converting
- assembly Wordize
Convert(string, string, SaveFormat)
Converts the given input document into the output document using specified input output file names and the final document format.
public static void Convert(string inputFile, string outputFile, SaveFormat saveFormat)
Parameter | Type | Description |
---|---|---|
inputFile | String | The input file name. |
outputFile | String | The output file name. |
saveFormat | SaveFormat | The save format. |
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Examples
Shows how to convert DOCX document to XPS.
Converter.Convert(MyDir + "Simple.docx", ArtifactsDir + "Converter.ConvertToXps.Xps", SaveFormat.Xps);
See Also
- enum SaveFormat
- class Converter
- namespace Wordize.Converting
- assembly Wordize
Convert(Stream, Stream, SaveFormat)
Converts the given input document into a single output document using specified input and output streams.
public static void Convert(Stream inputStream, Stream outputStream, SaveFormat saveFormat)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input stream. |
outputStream | Stream | The output stream. |
saveFormat | SaveFormat | The save format. |
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Examples
Shows how to convert DOCX document to DOC using streams.
using (Stream input = File.OpenRead(MyDir + "Simple.docx"))
using (Stream output = File.Create(ArtifactsDir + "Converter.ConvertToDocStream.doc"))
{
Converter.Convert(input, output, SaveFormat.Doc);
}
See Also
- enum SaveFormat
- class Converter
- namespace Wordize.Converting
- assembly Wordize