Free Support Forum -

Dynamic template generation

Looking through your site I don’t see that you would support the use case I’m looking for, but just to make sure I’m sending this request.

Our use case is we have many Health Plan Carrier vendors that we need to have our clients sign the legal documents for each Health Plan Carrier (for each line of coverage for each carrier). A client may end up needing to sign 30 different legal documents and each carrier has their own format to their legal documents. We are looking to find software that will help identify on each document the location of the signature and date that needs to be completed. Then tag those two areas on the form and save the document. That’s all we really need, because we already have DocuSign which can then manage the signature process. The issue is basically dynamically creating a template with the signature area tagged. Since we do .Net development we came across your API’s.


Thanks for your inquiry. Aspose.Words for .NET is a class library that enables your applications to perform a great range of document processing tasks.

Could you please share your input and expected output document here for our reference? We will then provide you more information about your query.

The Aspose.Words.Layout namespace provides classes that allow to access information such as on what page and where on a page particular document elements are positioned, when the document is formatted into pages.

They are proprietary legal documents from each of our Health Plan Carriers, so I can’t really share them. However, basically they are either PDF or Word documents that have legal language and on the last page they require a signature and date. The format of each carriers document, placement of signature/date are different across Health Plan Carriers. Our challenge there is lack of consistency. We would like to be able to dynamically locate the signature and date x & y to create a template signature document that identifies the x and y. The other option is if we can identify the location of the signature/date we could tag the carriers document with hidden text that could be used by document signature software to search for the tag/hidden text to know where the signature/date is located.


Thanks for your inquiry. You can insert the signature/date at any place in the document using Aspose.Words. We suggest you insert the date in the Shape node. The signature (image) is imported as Shape node into Aspose.Words’ DOM. Please set the Shape.WrapType as WrapType.Square and set Shape.Left and Shape.Top position according to your requirement. Please check the members of Shape class.

In this case, we suggest you please bookmark the desired content and access its position using Aspose.Words’ layout API.

Thanks. I think the instructions you provided would help if we knew the location in the document the signature and date were at. We were hoping to find software that could support finding/locating the position requirements dynamically. I’m sure that would be very challenging to do (i.e. software that would scan/search through a document to find where the signature/date need to go if there aren’t any tags in the document you can search on). We don’t actually have Aspose software today. We were looking for software that might exist that could dynamically find where in a document the position was for the signature line and date line.


Thanks for your inquiry. As shared in my previous posts, you can achieve your requirement using Aspose.Words. Please create a test document that contains the signature and date. We will then share the code example according to your requirement.

Please get 30 days temporary license and apply it before importing document into Aspose.Words’ DOM.

Following code example shows how to get the position of Shape node.

Document document = new Document(MyDir + "in.docx");

LayoutCollector collector = new LayoutCollector(document);
LayoutEnumerator enumerator = new LayoutEnumerator(document);

foreach (Shape shape in document.GetChildNodes(NodeType.Shape, true))
    enumerator.Current = collector.GetEntity(shape);

    Console.WriteLine("Left : "+enumerator.Rectangle.Left);
    Console.WriteLine("Top : " + enumerator.Rectangle.Top);