Create document dynamically an merge existing

Create document dynamically an merge existing

Forum member · Jul 22, 2009
I am creating a pdf dynamically. I have no problems there. What i would like to do is then insert an existing PDF after my dynamic content, THEN create more on the fly, THEN insert another existing PDF. I am using Document document = new Document(); to start things off. Content is created no problem. I am having difficulty with the syntax for adding an existing document afterwards. ImportedPage page = new ImportedPage... seems very combersome though it works. I would like the ability to import the whole 10 page document rather than import page by page. Please help. Thanks

Re: Create document dynamically an merge existing

Support · Jul 22, 2009
Hello, You can do this without any problem. Instead of using the Document object, use the MergeDocument object. Then use the Append method of the MergeDocument object that takes the path to an existing PDF document or byte array or a stream. That will allow you to add the entire document in just one line of code. Thanks, ceTe Software Support Team

Re: Create document dynamically an merge existing

Forum member · Jul 22, 2009
That is absolutely true. Worked like a charm. Thank you.