Possible to create a template entirely programmatically?
Thursday, January 10, 2019 at 10:14amWe have a need to create a transaction entirely programmatically without displaying any type of UI. To my knowledge this is possible through the use of templates. But as far as I can ascertain, templates needed to be created by hand in advance.
Is there a way to generate templates programmatically behind the scenes? By that I mean passing in a document and specifying coordinates / a location on a certain page to place the signature field and then being able to use that result to create a transaction and send it out without there ever needing to be human interaction?
Thanks
      
                                    
Reply to: Possible to create a template entirely programmatically?
Thursday, January 10, 2019 at 11:01amEslClient eslClient = new EslClient(API_KEY, API_URL); DocumentPackage template = PackageBuilder.NewPackageNamed("My template from scratch .NET SDK") .WithSigner(SignerBuilder.NewSignerPlaceholder(new Placeholder("PlaceholderId1"))) .WithDocument(DocumentBuilder.NewDocumentNamed("doc1") .FromFile("your_file_path") .WithSignature(SignatureBuilder.SignatureFor(new Placeholder("PlaceholderId1")) .OnPage(0) .AtPosition(100,100)) ) .Build(); PackageId templateId = eslClient.CreateTemplate(template); Debug.Print("templateId Id: " + templateId); DocumentPackage newPackage = PackageBuilder.NewPackageNamed("Package created from template") .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("singer1 firstname") .WithLastName("signer2 lastname") .Replacing(new Placeholder("PlaceholderId1"))) .Build(); PackageId packageFromTemplate = eslClient.CreatePackageFromTemplate(templateId, newPackage); Debug.Print("packageFromTemplate Id: " + packageFromTemplate); eslClient.SendPackage(packageFromTemplate);Hope this could help! DuoReply to: Possible to create a template entirely programmatically?
Thursday, January 10, 2019 at 11:24amReply to: Possible to create a template entirely programmatically?
Friday, January 11, 2019 at 04:07amReply to: Possible to create a template entirely programmatically?
Friday, January 11, 2019 at 04:25am