We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Section Break Continues AND Section Break Next Page with append

Hello,


I’m unable to figure out how to combined documents while keeping section break continues in the correct spots.

I have a series of documents that i’m combining using a mixture of

outputDoc.LastSection.AppendContent(doc.Sections(0))

When i simply want the text added to the doc as in the attached documents for “Firm Overview” and "Pro Bono"

When my code needs to merge in a “New Separator” document it uses AppendDoc

Public Sub AppendDoc(ByVal dstDoc As Document, ByVal srcDoc As Document)
For Each srcSection As Section In srcDoc
Dim dstSection As Section = CType(dstDoc.ImportNode(srcSection, True, ImportFormatMode.UseDestinationStyles), Section)
dstSection.PageSetup.SectionStart = SectionStart.NewPage
dstDoc.Sections.Add(dstSection)
Next srcSection
End Sub

The issues is when i need to have a SectionBreakContinues followed by the NewPage for each “New Separator” type page so that the text in the columns is balanced out. If i try to use
builder.InsertBreak(BreakType.SectionBreakContinuous) at the end of the Pro Bono doc or at the beginning of the “New Separator” doc, when i append the docs together the SectionBreakContinuous is gone.

The document correct.docx shows you i would like it to look.

We are using version 13.3 of aspose.words for .net




Hi Greg,

Thanks for your inquiry. Could you please attach your inputs Word documents here for testing? I will investigate the issue on my side and provide you more information.

Sure, here are the applicable templates.

Hi Greg,

Thanks for sharing the documents.

greg800:

The issues is when i need to have a SectionBreakContinues followed by the NewPage for each “New Separator” type page so that the text in the columns is balanced out. If i try to use
builder.InsertBreak(BreakType.SectionBreakContinuous) at the end of the Pro Bono doc or at the beginning of the “New Separator” doc, when i append the docs together the SectionBreakContinuous is gone.

Could you please share some more detail about this query? Are you using some documents for “Firm Overview” and “Pro Bono”? As per my understanding, at the end of ‘Pro Bono’ there is secion break new page and you want section break continuous. Please confirm this.

You have shared the template documents. Please

create a standalone/runnable simple application (for example a Console
Application Project
) that demonstrates the code (Aspose.Words code) you used to generate
your output document.


Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.