diff --git a/Videos/Fields/Fields.csproj b/Videos/Fields/Fields.csproj index 3089b23ac..6cded25ef 100644 --- a/Videos/Fields/Fields.csproj +++ b/Videos/Fields/Fields.csproj @@ -7,7 +7,7 @@ - + diff --git a/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images.sln b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images.sln new file mode 100644 index 000000000..c5a741069 --- /dev/null +++ b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36518.9 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apply-Matte-to-Transparent-Images", "Apply-Matte-to-Transparent-Images\Apply-Matte-to-Transparent-Images.csproj", "{40DB3241-BF83-4DDD-9CBF-2E9C35764362}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {40DB3241-BF83-4DDD-9CBF-2E9C35764362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40DB3241-BF83-4DDD-9CBF-2E9C35764362}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40DB3241-BF83-4DDD-9CBF-2E9C35764362}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40DB3241-BF83-4DDD-9CBF-2E9C35764362}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2147E089-3AAF-47EB-8F73-472AEE09DE80} + EndGlobalSection +EndGlobal diff --git a/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Apply-Matte-to-Transparent-Images.csproj b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Apply-Matte-to-Transparent-Images.csproj new file mode 100644 index 000000000..192cde16f --- /dev/null +++ b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Apply-Matte-to-Transparent-Images.csproj @@ -0,0 +1,24 @@ + + + + Exe + net8.0 + Apply_Matte_to_Transparent_Images + enable + enable + + + + + + + + + Always + + + Always + + + + diff --git a/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Data/Template.docx b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Data/Template.docx new file mode 100644 index 000000000..2a74ae42b Binary files /dev/null and b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Data/Template.docx differ diff --git a/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Output/.gitkeep b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Output/.gitkeep new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Output/.gitkeep @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Program.cs b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Program.cs new file mode 100644 index 000000000..0632bba5f --- /dev/null +++ b/Word-to-PDF-Conversion/Apply-Matte-to-Transparent-Images/.NET/Apply-Matte-to-Transparent-Images/Program.cs @@ -0,0 +1,31 @@ +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.DocIORenderer; +using Syncfusion.Pdf; + +namespace Apply_mattee_to_transparent_images +{ + class Program + { + public static void Main(string[] args) + { + FileStream fileStream = new FileStream(Path.GetFullPath(@"Data\Template.docx"), FileMode.Open); + //Loads an existing Word document + WordDocument wordDocument = new WordDocument(fileStream, FormatType.Docx); + //Instantiates DocIORenderer instance for Word to PDF conversion + DocIORenderer renderer = new DocIORenderer(); + //Set to true to apply a matte color to transparent images. + renderer.Settings.ApplyMatteToTransparentImages = true; + //Converts Word document into PDF document + PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument); + //Closes the instance of Word document object + wordDocument.Close(); + //Releases the resources occupied by DocIORenderer instance + renderer.Dispose(); + //Saves the PDF file + pdfDocument.Save(Path.GetFullPath(@"../../../Output/Result.pdf")); + //Closes the instance of PDF document object + pdfDocument.Close(); + } + } +} \ No newline at end of file