-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from SyncfusionExamples/WordToImage
Update GitHub demos with active projects and latest NuGet packages for Word Library
- Loading branch information
Showing
21 changed files
with
291 additions
and
288 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/App.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/> | ||
</startup> | ||
</configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
Convert-Word-to-image/.NET-Framework/Convert-Word-to-image/packages.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Syncfusion.Compression.Base" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.DocIO.WinForms" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.Licensing" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.OfficeChart.Base" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.OfficeChartToImageConverter.WinForms" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.SfChart.WPF" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.Compression.Base" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.DocIO.WinForms" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.Licensing" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.OfficeChart.Base" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.OfficeChartToImageConverter.WinForms" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.SfChart.WPF" version="26.1.42" targetFramework="net462" /> | ||
</packages> |
50 changes: 25 additions & 25 deletions
50
...e/.NET-Standard/Convert-Word-to-image.sln → ...d-to-image/.NET/Convert-Word-to-image.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
26 changes: 13 additions & 13 deletions
26
...ord-to-image/Convert-Word-to-image.csproj → ...ord-to-image/Convert-Word-to-image.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<RootNamespace>Convert_Word_to_image</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<RootNamespace>Convert_Word_to_image</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" /> | ||
</ItemGroup> | ||
|
||
</Project> |
74 changes: 37 additions & 37 deletions
74
...Standard/Convert-Word-to-image/Program.cs → ...age/.NET/Convert-Word-to-image/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/App.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/> | ||
</startup> | ||
</configuration> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
First-page-of-Word-to-image/.NET-Framework/First-page-of-Word-to-image/packages.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Syncfusion.Compression.Base" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.DocIO.WinForms" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.Licensing" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.OfficeChart.Base" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.OfficeChartToImageConverter.WinForms" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.SfChart.WPF" version="19.4.0.50" targetFramework="net46" /> | ||
<package id="Syncfusion.Compression.Base" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.DocIO.WinForms" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.Licensing" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.OfficeChart.Base" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.OfficeChartToImageConverter.WinForms" version="26.1.42" targetFramework="net462" /> | ||
<package id="Syncfusion.SfChart.WPF" version="26.1.42" targetFramework="net462" /> | ||
</packages> |
50 changes: 25 additions & 25 deletions
50
...-Standard/First-page-of-Word-to-image.sln → ...mage/.NET/First-page-of-Word-to-image.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.