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. |
Examples
Shows how to convert documents with a single line of code.
string doc = MyDir + "Document.docx";
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.pdf");
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.SaveFormat.rtf", SaveFormat.Rtf);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Password = "Aspose.Words" };
LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = true };
Converter.Convert(doc, loadOptions, ArtifactsDir + "LowCode.Convert.LoadOptions.docx", saveOptions);
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.SaveOptions.docx", saveOptions);
See Also
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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. |
Examples
Shows how to convert documents with a single line of code.
string doc = MyDir + "Document.docx";
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.pdf");
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.SaveFormat.rtf", SaveFormat.Rtf);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Password = "Aspose.Words" };
LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = true };
Converter.Convert(doc, loadOptions, ArtifactsDir + "LowCode.Convert.LoadOptions.docx", saveOptions);
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.SaveOptions.docx", saveOptions);
See Also
- enum SaveFormat
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
Convert(string, string, SaveOptions)
Converts the given input document into the output document using specified input output file names and save options.
public static void Convert(string inputFile, string outputFile, SaveOptions saveOptions)
Parameter | Type | Description |
---|---|---|
inputFile | String | The input file name. |
outputFile | String | The output file name. |
saveOptions | SaveOptions | The save options. |
Examples
Shows how to convert documents with a single line of code.
string doc = MyDir + "Document.docx";
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.pdf");
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.SaveFormat.rtf", SaveFormat.Rtf);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Password = "Aspose.Words" };
LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = true };
Converter.Convert(doc, loadOptions, ArtifactsDir + "LowCode.Convert.LoadOptions.docx", saveOptions);
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.SaveOptions.docx", saveOptions);
See Also
- class SaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
Convert(string, LoadOptions, string, SaveOptions)
Converts the given input document into the output document using specified input output file names its load/save options.
public static void Convert(string inputFile, LoadOptions loadOptions, string outputFile,
SaveOptions saveOptions)
Parameter | Type | Description |
---|---|---|
inputFile | String | The input file name. |
loadOptions | LoadOptions | The input document load options. |
outputFile | String | The output file name. |
saveOptions | SaveOptions | The save options. |
Examples
Shows how to convert documents with a single line of code.
string doc = MyDir + "Document.docx";
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.pdf");
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.SaveFormat.rtf", SaveFormat.Rtf);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Password = "Aspose.Words" };
LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = true };
Converter.Convert(doc, loadOptions, ArtifactsDir + "LowCode.Convert.LoadOptions.docx", saveOptions);
Converter.Convert(doc, ArtifactsDir + "LowCode.Convert.SaveOptions.docx", saveOptions);
See Also
- class LoadOptions
- class SaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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. |
Examples
Shows how to convert documents with a single line of code (Stream).
using (FileStream streamIn = new FileStream(MyDir + "Big document.docx", FileMode.Open, FileAccess.Read))
{
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.1.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, streamOut, SaveFormat.Docx);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Password = "Aspose.Words" };
LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = true };
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.2.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, loadOptions, streamOut, saveOptions);
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.3.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, streamOut, saveOptions);
}
See Also
- enum SaveFormat
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
Convert(Stream, Stream, SaveOptions)
Converts the given input document into a single output document using specified input and output streams.
public static void Convert(Stream inputStream, Stream outputStream, SaveOptions saveOptions)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input streams. |
outputStream | Stream | The output stream. |
saveOptions | SaveOptions | The save options. |
Examples
Shows how to convert documents with a single line of code (Stream).
using (FileStream streamIn = new FileStream(MyDir + "Big document.docx", FileMode.Open, FileAccess.Read))
{
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.1.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, streamOut, SaveFormat.Docx);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Password = "Aspose.Words" };
LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = true };
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.2.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, loadOptions, streamOut, saveOptions);
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.3.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, streamOut, saveOptions);
}
See Also
- class SaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
Convert(Stream, LoadOptions, Stream, SaveOptions)
Converts the given input document into a single output document using specified input and output streams.
public static void Convert(Stream inputStream, LoadOptions loadOptions, Stream outputStream,
SaveOptions saveOptions)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input streams. |
loadOptions | LoadOptions | The input document load options. |
outputStream | Stream | The output stream. |
saveOptions | SaveOptions | The save options. |
Examples
Shows how to convert documents with a single line of code (Stream).
using (FileStream streamIn = new FileStream(MyDir + "Big document.docx", FileMode.Open, FileAccess.Read))
{
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.1.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, streamOut, SaveFormat.Docx);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Password = "Aspose.Words" };
LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = true };
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.2.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, loadOptions, streamOut, saveOptions);
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.ConvertStream.3.docx", FileMode.Create, FileAccess.ReadWrite))
Converter.Convert(streamIn, streamOut, saveOptions);
}
See Also
- class LoadOptions
- class SaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words