Free Support Forum -

How to Insert Document at particular position of other document

Hello Team,

I want to know how to add a single-page document to another document after a specific page (such as after page number 3).

Also, In some cases, a single-page document needs to added as a front page.

Please let me know how to do that as soon as possible.


In your case, we suggest you following solution.

  1. Get the paragraph nodes of document using CompositeNode.GetChildNodes method.
  2. Iterate over paragraph nodes.
  3. Please get the desired page number of paragraph using LayoutCollector.GetStartPageIndex method.
  4. Move the cursor to the paragraph node.
  5. Insert the document using DocumentBuilder.InsertDocument method

Hope this helps you.