1

I'm attempting to create a pdf using an existing pdf document. In the current document I have a button that runs a simple script to insert a new page from the hidden page template in the document.

I want to use iTextsharp to fill out this form and add a new page if required, but for the life of me I can figure out how to add a page from the page templates.

Since the page template is hidden with in the original file, I can't seem to access is since it technically doesn't have a page number.

In the script in the original document I accomplish this as follows:

    var addTemp = this.getTemplate("tsAdd");
    addTemp.spawn();

I want to keep the template page hidden as the original file still gets used for other tasks.

Rusty
  • 43
  • 2
  • 1
    There is no explicit support for page templates in iText(Sharp). One can add it, though, using the low level APIs. [This answer](http://stackoverflow.com/questions/37264956/need-to-add-a-new-page-to-a-pdf-document-that-already-has-a-digital-signature/37408911#37408911) provides some helper methods in iText/Java. They shouldn't be to hard to port to iTextSharp/.Net. If your question was about c#, I might have done it myself. – mkl Aug 19 '16 at 08:57
  • Thanks for the info. I ended up not needing to use iText(Sharp) in the end. I had my documents created already so I just used the built in APIs to set my values and spawn my templates. – Rusty Sep 26 '16 at 20:56

0 Answers0