This sample shows how to copy page objects (text, paths and images) to a new PDF page using Docotic.Pdf library.
Use PdfDocument.CopyPages methods to copy complete page content and associated resources like fonts and images to a new document. Then use one of the PdfPage.GetObjects methods to get all page text, paths, and images. Copy the needed objects to a new page. At the end, remove the original page from the document.
You can remove or replace some content (e.g., text) from a page by copying only some of the page objects.
This sample does not preserve all structure information because it copies page objects to another page. Look at the Edit PDF page content sample that shows how to copy page objects to the same page and preserve structure information.