WordsAPI appendAllEntriesToOneSection flag issue

Previously we had a topic to add this flag WordsAPI splitting document to wrong number of pages

After you added this new flag we found a new bug. When we join 2 or more documents we see that all page breaks are deleted. Please fix this flag to add new document on the end of previous document but not to delete all page breaks.

Example: I have one document with 2 pages, the first page has one paragraph and a page break, the second page has one paragraph. I have a second document with one page. I use appendAllEntriesToOneSection
ER: I have the document with 3 pages (the second document was added to 2nd page of 1st document and continuous on 3rd page)
AR: I have 2 pages because page break between 1st and 2nd pages (in 1st document) was deleted

Please update API to just add a new document to the previous one without page break but not delete all page or sections break in documents we are joining

@LegalUp

It seems that you are experiencing an issue with the appendAllEntriesToOneSection flag in the Words API, where appending documents results in the deletion of page breaks. To address this, you can try the following approach:

  1. Set Section Start to Continuous: Before appending the documents, ensure that the first section of the source document is set to continuous. This can help maintain the flow of content without introducing unwanted page breaks. You can do this by making a request to update the section’s PageSetup property.

    Here’s an example of how to set the section start to continuous using a REST API call:

    curl -X PUT "https://api.aspose.cloud/v4.0/words/Sections_source.docx/sections/0/pageSetup?folder=Temp" \
    -H "accept: application/json" \
    -H "Authorization: Bearer [Access_Token]" \
    -H "Content-Type: application/json" \
    -H "x-aspose-client: Containerize.Swagger" \
    -d "{\"SectionStart\":\"Continuous\"}"
    
  2. Append Documents: After setting the section start to continuous, you can append your documents using the API. Make sure to specify the ImportFormatMode as KeepSourceFormatting to retain the original formatting of the documents being appended.

  3. Check for Page Breaks: If you still encounter issues with page breaks being removed, you may need to manually check and adjust the PageBreakBefore property of paragraphs in the documents. This can be done by retrieving the paragraphs and updating their format accordingly.

If the problem persists, it may be beneficial to report this issue to the support team for further investigation, as it appears to be a bug related to the handling of page breaks when using the appendAllEntriesToOneSection flag.

Feel free to reach out if you need further assistance or clarification on any of these steps!

KeepSourceFormatting doesn’t work

I will check your requirements and create a task for that.