Example: remove method

This example removes the first section of the document.

  TextSections sections = document.getSections();
  System.out.println(sections.getCount());
  TextSection section = sections.item(1);
  section.remove();
  System.out.println(sections.getCount());

Related information

remove method