Hi,
I’m trying to add an editable text field into PDF from a Word template in .NET.
When I replace a tag in the Word with a TextInput using the following method, it works fine:
aDoc.Range.Replace(new Regex("@Test"), new ReplaceWithInputText(), false);
private class ReplaceWithInputText : IReplacingCallback
{
ReplaceAction IReplacingCallback.Replacing(ReplacingArgs e)
{
DocumentBuilder builder = new DocumentBuilder((Word.Document)e.MatchNode.Document);
builder.MoveTo(e.MatchNode);
builder.InsertTextInput(" ", TextFormFieldType.Regular, "", "", 200);
return ReplaceAction.Replace;
}
}
The problem is I can’t set a custom size to this InputText (width and height).
Is there any other way to replace a tag in the Word template with an editable text field and set width and height, like a HTML TextArea tag?
Maybe replace it in the PDF after is converted from the Word template?
Thank’s in advance.