From a8ba866feb7dbde58a1bb6cb4cc8318a4be12910 Mon Sep 17 00:00:00 2001 From: Konduru Keerthi Konduru Ravichandra Raju Date: Tue, 23 Jul 2024 17:41:31 +0530 Subject: [PATCH] Word to Image --- .../Convert-Word-to-image/App.config | 6 +- .../Convert-Word-to-image.csproj | 27 ++++--- .../Convert-Word-to-image/packages.config | 12 +-- .../Convert-Word-to-image.sln | 50 ++++++------ .../Convert-Word-to-image.csproj | 26 +++--- .../Convert-Word-to-image/Program.cs | 74 +++++++++--------- .../Convert-Word-to-image/Template.docx | Bin .../First-page-of-Word-to-image/App.config | 6 +- .../First-page-of-Word-to-image.csproj | 27 ++++--- .../packages.config | 12 +-- .../First-page-of-Word-to-image.sln | 50 ++++++------ .../First-page-of-Word-to-image.csproj | 26 +++--- .../First-page-of-Word-to-image/Program.cs | 68 ++++++++-------- .../First-page-of-Word-to-image/Template.docx | Bin .../App.config | 6 +- .../Specific-range-of-pages-to-image.csproj | 27 ++++--- .../packages.config | 12 +-- .../Specific-range-of-pages-to-image.sln | 50 ++++++------ .../Program.cs | 74 +++++++++--------- .../Specific-range-of-pages-to-image.csproj | 26 +++--- .../Template.docx | Bin 21 files changed, 291 insertions(+), 288 deletions(-) rename Convert-Word-to-image/{.NET-Standard => .NET}/Convert-Word-to-image.sln (97%) rename Convert-Word-to-image/{.NET-Standard => .NET}/Convert-Word-to-image/Convert-Word-to-image.csproj (81%) rename Convert-Word-to-image/{.NET-Standard => .NET}/Convert-Word-to-image/Program.cs (97%) rename Convert-Word-to-image/{.NET-Standard => .NET}/Convert-Word-to-image/Template.docx (100%) rename First-page-of-Word-to-image/{.NET-Standard => .NET}/First-page-of-Word-to-image.sln (97%) rename First-page-of-Word-to-image/{.NET-Standard => .NET}/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj (81%) rename First-page-of-Word-to-image/{.NET-Standard => .NET}/First-page-of-Word-to-image/Program.cs (97%) rename First-page-of-Word-to-image/{.NET-Standard => .NET}/First-page-of-Word-to-image/Template.docx (100%) rename Specific-range-of-pages-to-image/{.NET-Standard => .NET}/Specific-range-of-pages-to-image.sln (97%) rename Specific-range-of-pages-to-image/{.NET-Standard => .NET}/Specific-range-of-pages-to-image/Program.cs (97%) rename Specific-range-of-pages-to-image/{.NET-Standard => .NET}/Specific-range-of-pages-to-image/Specific-range-of-pages-to-image.csproj (81%) rename Specific-range-of-pages-to-image/{.NET-Standard => .NET}/Specific-range-of-pages-to-image/Template.docx (100%) diff --git a/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/App.config b/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/App.config index bbb5314..e89424b 100644 --- a/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/App.config +++ b/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/Convert-Word-to-image.csproj b/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/Convert-Word-to-image.csproj index c40e04f..ffd0bae 100644 --- a/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/Convert-Word-to-image.csproj +++ b/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/Convert-Word-to-image.csproj @@ -8,10 +8,11 @@ Exe Convert_Word_to_image Convert-Word-to-image - v4.6 + v4.6.2 512 true true + AnyCPU @@ -33,23 +34,23 @@ 4 - - ..\packages\Syncfusion.Compression.Base.19.4.0.50\lib\net46\Syncfusion.Compression.Base.dll + + ..\packages\Syncfusion.Compression.Base.26.1.42\lib\net462\Syncfusion.Compression.Base.dll - - ..\packages\Syncfusion.DocIO.WinForms.19.4.0.50\lib\net46\Syncfusion.DocIO.Base.dll + + ..\packages\Syncfusion.DocIO.WinForms.26.1.42\lib\net462\Syncfusion.DocIO.Base.dll - - ..\packages\Syncfusion.Licensing.19.4.0.50\lib\net46\Syncfusion.Licensing.dll + + ..\packages\Syncfusion.Licensing.26.1.42\lib\net462\Syncfusion.Licensing.dll - - ..\packages\Syncfusion.OfficeChart.Base.19.4.0.50\lib\net46\Syncfusion.OfficeChart.Base.dll + + ..\packages\Syncfusion.OfficeChart.Base.26.1.42\lib\net462\Syncfusion.OfficeChart.Base.dll - - ..\packages\Syncfusion.OfficeChartToImageConverter.WinForms.19.4.0.50\lib\net46\Syncfusion.OfficeChartToImageConverter.Wpf.dll + + ..\packages\Syncfusion.OfficeChartToImageConverter.WinForms.26.1.42\lib\net462\Syncfusion.OfficeChartToImageConverter.Wpf.dll - - ..\packages\Syncfusion.SfChart.WPF.19.4.0.50\lib\net46\Syncfusion.SfChart.WPF.dll + + ..\packages\Syncfusion.SfChart.WPF.26.1.42\lib\net462\Syncfusion.SfChart.WPF.dll diff --git a/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/packages.config b/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/packages.config index 123a4ae..554041f 100644 --- a/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/packages.config +++ b/Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/packages.config @@ -1,9 +1,9 @@  - - - - - - + + + + + + \ No newline at end of file diff --git a/Convert-Word-to-image/.NET-Standard/Convert-Word-to-image.sln b/Convert-Word-to-image/.NET/Convert-Word-to-image.sln similarity index 97% rename from Convert-Word-to-image/.NET-Standard/Convert-Word-to-image.sln rename to Convert-Word-to-image/.NET/Convert-Word-to-image.sln index e09a9e2..bc2594f 100644 --- a/Convert-Word-to-image/.NET-Standard/Convert-Word-to-image.sln +++ b/Convert-Word-to-image/.NET/Convert-Word-to-image.sln @@ -1,25 +1,25 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-Word-to-image", "Convert-Word-to-image\Convert-Word-to-image.csproj", "{E214E65C-980A-46F5-8207-6D02212A49F5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {404A7F36-0167-4219-AE4D-2B0626CEB7E3} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-Word-to-image", "Convert-Word-to-image\Convert-Word-to-image.csproj", "{E214E65C-980A-46F5-8207-6D02212A49F5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {404A7F36-0167-4219-AE4D-2B0626CEB7E3} + EndGlobalSection +EndGlobal diff --git a/Convert-Word-to-image/.NET-Standard/Convert-Word-to-image/Convert-Word-to-image.csproj b/Convert-Word-to-image/.NET/Convert-Word-to-image/Convert-Word-to-image.csproj similarity index 81% rename from Convert-Word-to-image/.NET-Standard/Convert-Word-to-image/Convert-Word-to-image.csproj rename to Convert-Word-to-image/.NET/Convert-Word-to-image/Convert-Word-to-image.csproj index 752fe4c..3396d0b 100644 --- a/Convert-Word-to-image/.NET-Standard/Convert-Word-to-image/Convert-Word-to-image.csproj +++ b/Convert-Word-to-image/.NET/Convert-Word-to-image/Convert-Word-to-image.csproj @@ -1,13 +1,13 @@ - - - - Exe - netcoreapp3.1 - Convert_Word_to_image - - - - - - - + + + + Exe + net8.0 + Convert_Word_to_image + + + + + + + diff --git a/Convert-Word-to-image/.NET-Standard/Convert-Word-to-image/Program.cs b/Convert-Word-to-image/.NET/Convert-Word-to-image/Program.cs similarity index 97% rename from Convert-Word-to-image/.NET-Standard/Convert-Word-to-image/Program.cs rename to Convert-Word-to-image/.NET/Convert-Word-to-image/Program.cs index 2a4309f..f6579cd 100644 --- a/Convert-Word-to-image/.NET-Standard/Convert-Word-to-image/Program.cs +++ b/Convert-Word-to-image/.NET/Convert-Word-to-image/Program.cs @@ -1,37 +1,37 @@ -using System.IO; -using Syncfusion.DocIO; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocIORenderer; - -namespace Convert_Word_to_image -{ - class Program - { - static void Main(string[] args) - { - //Open the file as Stream. - using (FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Template.docx"), FileMode.Open)) - { - //Load an existing Word document. - using (WordDocument wordDocument = new WordDocument(fileStream, FormatType.Automatic)) - { - //Create a new instance of DocIORenderer. - using (DocIORenderer renderer = new DocIORenderer()) - { - //Convert an entire Word document to images. - Stream[] imageStreams = wordDocument.RenderAsImages(); - for (int i=0; i< imageStreams.Length;i++) - { - //Create the output image file stream. - using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"../../../WordToImage_" + i + ".jpeg"))) - { - //Copy the converted image stream into created output stream. - imageStreams[i].CopyTo(fileStreamOutput); - } - } - } - } - } - } - } -} +using System.IO; +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.DocIORenderer; + +namespace Convert_Word_to_image +{ + class Program + { + static void Main(string[] args) + { + //Open the file as Stream. + using (FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Template.docx"), FileMode.Open)) + { + //Load an existing Word document. + using (WordDocument wordDocument = new WordDocument(fileStream, FormatType.Automatic)) + { + //Create a new instance of DocIORenderer. + using (DocIORenderer renderer = new DocIORenderer()) + { + //Convert an entire Word document to images. + Stream[] imageStreams = wordDocument.RenderAsImages(); + for (int i=0; i< imageStreams.Length;i++) + { + //Create the output image file stream. + using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"../../../WordToImage_" + i + ".jpeg"))) + { + //Copy the converted image stream into created output stream. + imageStreams[i].CopyTo(fileStreamOutput); + } + } + } + } + } + } + } +} diff --git a/Convert-Word-to-image/.NET-Standard/Convert-Word-to-image/Template.docx b/Convert-Word-to-image/.NET/Convert-Word-to-image/Template.docx similarity index 100% rename from Convert-Word-to-image/.NET-Standard/Convert-Word-to-image/Template.docx rename to Convert-Word-to-image/.NET/Convert-Word-to-image/Template.docx diff --git a/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/App.config b/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/App.config index bbb5314..e89424b 100644 --- a/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/App.config +++ b/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj b/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj index 31a410b..b922016 100644 --- a/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj +++ b/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj @@ -8,10 +8,11 @@ Exe First_page_of_Word_to_image First-page-of-Word-to-image - v4.6 + v4.6.2 512 true true + AnyCPU @@ -33,23 +34,23 @@ 4 - - ..\packages\Syncfusion.Compression.Base.19.4.0.50\lib\net46\Syncfusion.Compression.Base.dll + + ..\packages\Syncfusion.Compression.Base.26.1.42\lib\net462\Syncfusion.Compression.Base.dll - - ..\packages\Syncfusion.DocIO.WinForms.19.4.0.50\lib\net46\Syncfusion.DocIO.Base.dll + + ..\packages\Syncfusion.DocIO.WinForms.26.1.42\lib\net462\Syncfusion.DocIO.Base.dll - - ..\packages\Syncfusion.Licensing.19.4.0.50\lib\net46\Syncfusion.Licensing.dll + + ..\packages\Syncfusion.Licensing.26.1.42\lib\net462\Syncfusion.Licensing.dll - - ..\packages\Syncfusion.OfficeChart.Base.19.4.0.50\lib\net46\Syncfusion.OfficeChart.Base.dll + + ..\packages\Syncfusion.OfficeChart.Base.26.1.42\lib\net462\Syncfusion.OfficeChart.Base.dll - - ..\packages\Syncfusion.OfficeChartToImageConverter.WinForms.19.4.0.50\lib\net46\Syncfusion.OfficeChartToImageConverter.Wpf.dll + + ..\packages\Syncfusion.OfficeChartToImageConverter.WinForms.26.1.42\lib\net462\Syncfusion.OfficeChartToImageConverter.Wpf.dll - - ..\packages\Syncfusion.SfChart.WPF.19.4.0.50\lib\net46\Syncfusion.SfChart.WPF.dll + + ..\packages\Syncfusion.SfChart.WPF.26.1.42\lib\net462\Syncfusion.SfChart.WPF.dll diff --git a/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/packages.config b/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/packages.config index 123a4ae..554041f 100644 --- a/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/packages.config +++ b/First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/packages.config @@ -1,9 +1,9 @@  - - - - - - + + + + + + \ No newline at end of file diff --git a/First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image.sln b/First-page-of-Word-to-image/.NET/First-page-of-Word-to-image.sln similarity index 97% rename from First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image.sln rename to First-page-of-Word-to-image/.NET/First-page-of-Word-to-image.sln index dd7eb31..0659fcd 100644 --- a/First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image.sln +++ b/First-page-of-Word-to-image/.NET/First-page-of-Word-to-image.sln @@ -1,25 +1,25 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "First-page-of-Word-to-image", "First-page-of-Word-to-image\First-page-of-Word-to-image.csproj", "{E214E65C-980A-46F5-8207-6D02212A49F5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {404A7F36-0167-4219-AE4D-2B0626CEB7E3} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "First-page-of-Word-to-image", "First-page-of-Word-to-image\First-page-of-Word-to-image.csproj", "{E214E65C-980A-46F5-8207-6D02212A49F5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {404A7F36-0167-4219-AE4D-2B0626CEB7E3} + EndGlobalSection +EndGlobal diff --git a/First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj b/First-page-of-Word-to-image/.NET/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj similarity index 81% rename from First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj rename to First-page-of-Word-to-image/.NET/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj index c05512e..5618230 100644 --- a/First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj +++ b/First-page-of-Word-to-image/.NET/First-page-of-Word-to-image/First-page-of-Word-to-image.csproj @@ -1,13 +1,13 @@ - - - - Exe - netcoreapp3.1 - First_page_of_Word_to_image - - - - - - - + + + + Exe + net8.0 + First_page_of_Word_to_image + + + + + + + diff --git a/First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image/Program.cs b/First-page-of-Word-to-image/.NET/First-page-of-Word-to-image/Program.cs similarity index 97% rename from First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image/Program.cs rename to First-page-of-Word-to-image/.NET/First-page-of-Word-to-image/Program.cs index 36340ba..6a6da15 100644 --- a/First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image/Program.cs +++ b/First-page-of-Word-to-image/.NET/First-page-of-Word-to-image/Program.cs @@ -1,34 +1,34 @@ -using System.IO; -using Syncfusion.DocIO; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocIORenderer; - -namespace First_page_of_Word_to_image -{ - class Program - { - static void Main(string[] args) - { - //Open the file as stream - using (FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Template.docx"), FileMode.Open)) - { - //Load an existing Word document. - using (WordDocument wordDocument = new WordDocument(fileStream, FormatType.Automatic)) - { - //Create an instance of DocIORenderer. - using (DocIORenderer renderer = new DocIORenderer()) - { - //Convert the first page of Word document into an image. - Stream imageStream = wordDocument.RenderAsImages(0, ExportImageFormat.Jpeg); - //Create the output image file stream. - using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"../../../WordToImage.jpeg"))) - { - //Copy the converted image stream into created output stream. - imageStream.CopyTo(fileStreamOutput); - } - } - } - } - } - } -} +using System.IO; +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.DocIORenderer; + +namespace First_page_of_Word_to_image +{ + class Program + { + static void Main(string[] args) + { + //Open the file as stream + using (FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Template.docx"), FileMode.Open)) + { + //Load an existing Word document. + using (WordDocument wordDocument = new WordDocument(fileStream, FormatType.Automatic)) + { + //Create an instance of DocIORenderer. + using (DocIORenderer renderer = new DocIORenderer()) + { + //Convert the first page of Word document into an image. + Stream imageStream = wordDocument.RenderAsImages(0, ExportImageFormat.Jpeg); + //Create the output image file stream. + using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"../../../WordToImage.jpeg"))) + { + //Copy the converted image stream into created output stream. + imageStream.CopyTo(fileStreamOutput); + } + } + } + } + } + } +} diff --git a/First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image/Template.docx b/First-page-of-Word-to-image/.NET/First-page-of-Word-to-image/Template.docx similarity index 100% rename from First-page-of-Word-to-image/.NET-Standard/First-page-of-Word-to-image/Template.docx rename to First-page-of-Word-to-image/.NET/First-page-of-Word-to-image/Template.docx diff --git a/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/App.config b/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/App.config index bbb5314..e89424b 100644 --- a/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/App.config +++ b/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/Specific-range-of-pages-to-image.csproj b/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/Specific-range-of-pages-to-image.csproj index 2c70a84..ade4568 100644 --- a/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/Specific-range-of-pages-to-image.csproj +++ b/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/Specific-range-of-pages-to-image.csproj @@ -8,10 +8,11 @@ Exe Specific_range_of_pages_to_image Specific-range-of-pages-to-image - v4.6 + v4.6.2 512 true true + AnyCPU @@ -33,23 +34,23 @@ 4 - - ..\packages\Syncfusion.Compression.Base.19.4.0.50\lib\net46\Syncfusion.Compression.Base.dll + + ..\packages\Syncfusion.Compression.Base.26.1.42\lib\net462\Syncfusion.Compression.Base.dll - - ..\packages\Syncfusion.DocIO.WinForms.19.4.0.50\lib\net46\Syncfusion.DocIO.Base.dll + + ..\packages\Syncfusion.DocIO.WinForms.26.1.42\lib\net462\Syncfusion.DocIO.Base.dll - - ..\packages\Syncfusion.Licensing.19.4.0.50\lib\net46\Syncfusion.Licensing.dll + + ..\packages\Syncfusion.Licensing.26.1.42\lib\net462\Syncfusion.Licensing.dll - - ..\packages\Syncfusion.OfficeChart.Base.19.4.0.50\lib\net46\Syncfusion.OfficeChart.Base.dll + + ..\packages\Syncfusion.OfficeChart.Base.26.1.42\lib\net462\Syncfusion.OfficeChart.Base.dll - - ..\packages\Syncfusion.OfficeChartToImageConverter.WinForms.19.4.0.50\lib\net46\Syncfusion.OfficeChartToImageConverter.Wpf.dll + + ..\packages\Syncfusion.OfficeChartToImageConverter.WinForms.26.1.42\lib\net462\Syncfusion.OfficeChartToImageConverter.Wpf.dll - - ..\packages\Syncfusion.SfChart.WPF.19.4.0.50\lib\net46\Syncfusion.SfChart.WPF.dll + + ..\packages\Syncfusion.SfChart.WPF.26.1.42\lib\net462\Syncfusion.SfChart.WPF.dll diff --git a/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/packages.config b/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/packages.config index 123a4ae..554041f 100644 --- a/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/packages.config +++ b/Specific-range-of-pages-to-image/.NET-Framework/Specific-range-of-pages-to-image/packages.config @@ -1,9 +1,9 @@  - - - - - - + + + + + + \ No newline at end of file diff --git a/Specific-range-of-pages-to-image/.NET-Standard/Specific-range-of-pages-to-image.sln b/Specific-range-of-pages-to-image/.NET/Specific-range-of-pages-to-image.sln similarity index 97% rename from Specific-range-of-pages-to-image/.NET-Standard/Specific-range-of-pages-to-image.sln rename to Specific-range-of-pages-to-image/.NET/Specific-range-of-pages-to-image.sln index 52e2ec2..fa4abc2 100644 --- a/Specific-range-of-pages-to-image/.NET-Standard/Specific-range-of-pages-to-image.sln +++ b/Specific-range-of-pages-to-image/.NET/Specific-range-of-pages-to-image.sln @@ -1,25 +1,25 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Specific-range-of-pages-to-image", "Specific-range-of-pages-to-image\Specific-range-of-pages-to-image.csproj", "{E214E65C-980A-46F5-8207-6D02212A49F5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {404A7F36-0167-4219-AE4D-2B0626CEB7E3} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Specific-range-of-pages-to-image", "Specific-range-of-pages-to-image\Specific-range-of-pages-to-image.csproj", "{E214E65C-980A-46F5-8207-6D02212A49F5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E214E65C-980A-46F5-8207-6D02212A49F5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {404A7F36-0167-4219-AE4D-2B0626CEB7E3} + EndGlobalSection +EndGlobal diff --git a/Specific-range-of-pages-to-image/.NET-Standard/Specific-range-of-pages-to-image/Program.cs b/Specific-range-of-pages-to-image/.NET/Specific-range-of-pages-to-image/Program.cs similarity index 97% rename from Specific-range-of-pages-to-image/.NET-Standard/Specific-range-of-pages-to-image/Program.cs rename to Specific-range-of-pages-to-image/.NET/Specific-range-of-pages-to-image/Program.cs index 79c6476..6ab690d 100644 --- a/Specific-range-of-pages-to-image/.NET-Standard/Specific-range-of-pages-to-image/Program.cs +++ b/Specific-range-of-pages-to-image/.NET/Specific-range-of-pages-to-image/Program.cs @@ -1,37 +1,37 @@ -using System.IO; -using Syncfusion.DocIO; -using Syncfusion.DocIO.DLS; -using Syncfusion.DocIORenderer; - -namespace Specific_range_of_pages_to_image -{ - class Program - { - static void Main(string[] args) - { - //Open the file as stream. - using (FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Template.docx"), FileMode.Open)) - { - //Load an existing Word document. - using (WordDocument wordDocument = new WordDocument(fileStream, FormatType.Automatic)) - { - //Create an instance of DocIORenderer. - using (DocIORenderer renderer = new DocIORenderer()) - { - //Convert a specific range of pages in Word document to images. - Stream[] imageStreams = wordDocument.RenderAsImages(1, 2); - for(int i=0; i - - - Exe - netcoreapp3.1 - Specific_range_of_pages_to_image - - - - - - - + + + + Exe + net8.0 + Specific_range_of_pages_to_image + + + + + + + diff --git a/Specific-range-of-pages-to-image/.NET-Standard/Specific-range-of-pages-to-image/Template.docx b/Specific-range-of-pages-to-image/.NET/Specific-range-of-pages-to-image/Template.docx similarity index 100% rename from Specific-range-of-pages-to-image/.NET-Standard/Specific-range-of-pages-to-image/Template.docx rename to Specific-range-of-pages-to-image/.NET/Specific-range-of-pages-to-image/Template.docx