File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Word-to-Image-conversion/Convert-Word-to-image/.NET/Convert-Word-to-image Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments