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

Free Support Forum - aspose.com

Extract section from one pdf and put it to another one

Hi Aspose-Team,

I generated 2 Pdfs. Is it possible to cut out a section from one pdf and to put it to another one between certain sections. Can you provide some code snippets?

For my purpose i generate one pdf via binding xml with xslt which contains 2 sections. Another pdf is generated from html. This generated html-section i have to extract and put to the first pdf between section 1 and 2. Is it possible?

Thank you very much for any help and hints.

Hi Alex,

Thanks for contacting support.

In order to accomplish your requirement, you may consider directly loading second HTML file and add it to exiting PDF document (the one created with XML and XSLT). For more information, please visit Add HTML String using DOM

Another approach could be to extract Text from PDF document and you can add text to existing PDF file. In order to accomplish your requirement, when you extract the text, you can also get the formatting information for each TextFragment and when adding to existing PDF file, you can specify same formatting information for each fragment but this requires complete track of each individual TextFragment and its formatting. For further details, please visit