Skip to content

Commit 7a68381

Browse files
Updated GitHub for FT samples
1 parent 8d475e7 commit 7a68381

File tree

1 file changed

+3
-3
lines changed
  • Word-to-Image-conversion/Convert-Word-to-image/.NET/Convert-Word-to-image

1 file changed

+3
-3
lines changed

Word-to-Image-conversion/Convert-Word-to-image/.NET/Convert-Word-to-image/Program.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Program
99
{
1010
static void Main(string[] args)
1111
{
12+
// Open the Word document file stream
1213
using (FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open))
1314
{
1415
//Loads an existing Word document.
@@ -17,14 +18,13 @@ static void Main(string[] args)
1718
//Creates an instance of DocIORenderer.
1819
using (DocIORenderer renderer = new DocIORenderer())
1920
{
20-
//Converts Word document to images.
21+
//Convert the entire Word document to images.
2122
Stream[] imageStreams = wordDocument.RenderAsImages();
2223
for (int i = 0; i < imageStreams.Length; i++)
2324
{
24-
//Creates the output image file stream.
25+
//Save the image stream as file.
2526
using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"Output/Output_" + i + ".jpeg")))
2627
{
27-
//Copies the converted image stream into created output stream.
2828
imageStreams[i].CopyTo(fileStreamOutput);
2929
}
3030
}

0 commit comments

Comments
 (0)