diff --git a/Bookmarks/README.md b/Bookmarks/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Bookmarks/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Charts/README.md b/Charts/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Charts/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Comments/README.md b/Comments/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Comments/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Compare-Word-documents/README.md b/Compare-Word-documents/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Compare-Word-documents/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Content-Controls/README.md b/Content-Controls/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Content-Controls/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/FAQs/README.md b/FAQs/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/FAQs/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Fields/README.md b/Fields/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Fields/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Find-and-Replace/README.md b/Find-and-Replace/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Find-and-Replace/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Find-item-in-word-document/README.md b/Find-item-in-word-document/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Find-item-in-word-document/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Footnotes-and-Endnotes/README.md b/Footnotes-and-Endnotes/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Footnotes-and-Endnotes/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Form-Fields/README.md b/Form-Fields/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Form-Fields/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Getting-Started/README.md b/Getting-Started/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Getting-Started/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/HTML-conversions/README.md b/HTML-conversions/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/HTML-conversions/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Macros/README.md b/Macros/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Macros/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Mail-Merge/README.md b/Mail-Merge/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Mail-Merge/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Markdown-to-Word-conversion/README.md b/Markdown-to-Word-conversion/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Markdown-to-Word-conversion/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Mathematical-Equation/README.md b/Mathematical-Equation/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Mathematical-Equation/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Paragraphs/README.md b/Paragraphs/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Paragraphs/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/RTF-conversions/README.md b/RTF-conversions/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/RTF-conversions/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Read-and-Save-document/README.md b/Read-and-Save-document/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Read-and-Save-document/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Sections/README.md b/Sections/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Sections/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Security/README.md b/Security/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Security/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Shapes/README.md b/Shapes/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Shapes/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/SmartArts/README.md b/SmartArts/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/SmartArts/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Table-Of-Contents/README.md b/Table-Of-Contents/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Table-Of-Contents/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Tables/README.md b/Tables/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Tables/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Text-file-conversion/README.md b/Text-file-conversion/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Text-file-conversion/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Track-Changes/README.md b/Track-Changes/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Track-Changes/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Watermark/README.md b/Watermark/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Watermark/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Word-document/README.md b/Word-document/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Word-document/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Word-file-formats/README.md b/Word-file-formats/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Word-file-formats/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Word-to-EPUB-conversion/README.md b/Word-to-EPUB-conversion/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Word-to-EPUB-conversion/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Word-to-Image-conversion/README.md b/Word-to-Image-conversion/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Word-to-Image-conversion/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution.sln b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution.sln new file mode 100644 index 000000000..94055a0be --- /dev/null +++ b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35527.113 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Set-custom-image-resolution", "Set-custom-image-resolution\Set-custom-image-resolution.csproj", "{5B0540C8-1A4D-4BB4-A0B9-10028D140E00}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5B0540C8-1A4D-4BB4-A0B9-10028D140E00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B0540C8-1A4D-4BB4-A0B9-10028D140E00}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B0540C8-1A4D-4BB4-A0B9-10028D140E00}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B0540C8-1A4D-4BB4-A0B9-10028D140E00}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Data/Template.docx b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Data/Template.docx new file mode 100644 index 000000000..513e1bc4e Binary files /dev/null and b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Data/Template.docx differ diff --git a/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Output/.gitkeep b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Output/.gitkeep new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Output/.gitkeep @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Program.cs b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Program.cs new file mode 100644 index 000000000..8e575d09d --- /dev/null +++ b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Program.cs @@ -0,0 +1,54 @@ +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.DocIORenderer; +using System.Drawing; +using System.Drawing.Imaging; + + +// Open the input Word document stream in read mode +using (FileStream docStream = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open, FileAccess.Read)) +{ + // Load the Word document using Syncfusion DocIO + using (WordDocument document = new WordDocument(docStream, FormatType.Automatic)) + { + // Create an instance of DocIORenderer to render the Word document as images + using (DocIORenderer render = new DocIORenderer()) + { + // Convert all pages of the Word document to image streams + Stream[] imageStreams = document.RenderAsImages(); + + // Iterate through each image stream (one per page) + for (int i = 0; i < imageStreams.Length; i++) + { + // Reset the stream position to the beginning + imageStreams[i].Position = 0; + + // Define custom dimensions for the output image + int customWidth = 1500; + int customHeight = 1500; + + // Load the image from stream + Image image = Image.FromStream(imageStreams[i]); + + // Save the image to a new memory stream in PNG format + MemoryStream stream = new MemoryStream(); + image.Save(stream, ImageFormat.Png); + + // Create a new bitmap with custom size and pixel format + Bitmap bitmap = new Bitmap(customWidth, customHeight, PixelFormat.Format32bppPArgb); + + // Create graphics object to draw on the bitmap + Graphics graphics = Graphics.FromImage(bitmap); + + // Set bitmap resolution to 300 DPI + bitmap.SetResolution(300, 300); + + // Draw the resized image onto the custom-sized bitmap + graphics.DrawImage(Image.FromStream(stream), new Rectangle(0, 0, bitmap.Width, bitmap.Height)); + + // Save the final bitmap image to output folder + bitmap.Save(Path.GetFullPath(@"Output/Image_" + i + ".png")); + } + } + } +} diff --git a/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Set-custom-image-resolution.csproj b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Set-custom-image-resolution.csproj new file mode 100644 index 000000000..7964322dd --- /dev/null +++ b/Word-to-Image-conversion/Set-custom-image-resolution/.NET/Set-custom-image-resolution/Set-custom-image-resolution.csproj @@ -0,0 +1,24 @@ + + + + Exe + net8.0 + Set_custom_image_resolution + enable + enable + + + + + + + + + Always + + + Always + + + + diff --git a/Word-to-Markdown-conversion/README.md b/Word-to-Markdown-conversion/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Word-to-Markdown-conversion/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Word-to-ODT-conversion/README.md b/Word-to-ODT-conversion/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Word-to-ODT-conversion/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file diff --git a/Word-to-PDF-Conversion/README.md b/Word-to-PDF-Conversion/README.md new file mode 100644 index 000000000..a0dd24270 --- /dev/null +++ b/Word-to-PDF-Conversion/README.md @@ -0,0 +1,3 @@ +**Note:** + +If you get a "DirectoryNotFoundException" error, it may be due to a long file path. Shorten the path or move the sample to a folder with a shorter path and try again. \ No newline at end of file