Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.37614.0 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Make-Paragraph-To-Start-On-New-Page", "Make-Paragraph-To-Start-On-New-Page\Make-Paragraph-To-Start-On-New-Page.csproj", "{08579255-C4D0-D3D2-F29B-F447F32D50D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{08579255-C4D0-D3D2-F29B-F447F32D50D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08579255-C4D0-D3D2-F29B-F447F32D50D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08579255-C4D0-D3D2-F29B-F447F32D50D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08579255-C4D0-D3D2-F29B-F447F32D50D9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AC6C429F-37FB-4F82-AAFF-4EB906F0F299}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Make_Paragraph_To_Start_On_New_Page</RootNamespace>
</PropertyGroup>

<ItemGroup>
<None Update="Output\.gitkeep">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
</ItemGroup>



</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Syncfusion.DocIO.DLS;
using System.IO;

namespace Make_Paragraph_To_Start_On_New_Page
{
class Program
{
static void Main(string[] args)
{
//Creates a new Word document instance.
using (WordDocument document = new WordDocument())
{
//Adds the section into Word document.
IWSection section = document.AddSection();

//Adds a paragraph to created section.
IWParagraph firstPageParagraph = section.AddParagraph();

//Appends the text to the created paragraph.
IWTextRange textRange = firstPageParagraph.AppendText("Adventure Works Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company.");

//Adds a paragraph move to the new page
IWParagraph paragraph = section.AddParagraph();

//Sets Page break.
paragraph.ParagraphFormat.PageBreakBefore = true;

//Appends the text to the created paragraph.
IWTextRange newPageTextRange = paragraph.AppendText("The company manufactures and sells metal and composite bicycles to North American, European and Asian commercial markets.");

document.Save(Path.GetFullPath("Output/Output.docx"));
}
}
}
}
Loading