Account


Earned badges

Achievement: Latest Unlocked

Topic Started

Topics
I have a requirement to create a package which have multiple documents. First Document will be pdf document and other documents can be pdf or images. If it is possible can any send me a sample code.
I took the sample code .net code (c#) from online and was getting the below error when creating a template and package. "Could not create template. Exception: Error communicating with esl server.

Replies Created

Reply to: Creating the template or package give error

0 votes
Hi Haris, I took the code from https://www.esignlive.com/blog/esignlive-how-to-creating-a-template/ I also downloaded the SDK samples and tried the code. I am new to eSign. My requirement is to write a custom app(C#) that will upload the document to eSign and then monitor if the document has been signed and after it has been signed download the whole package. Thanks, Raji

Reply to: Creating the template or package give error

0 votes
public PackageId CreateTemplate() { EslClient eslclient = new EslClient("APIKEY", "https://sandbox.e-signlive.com/api"); string SignDocPath = @"C:\Projects\DigitalSign\SampleCode\GISOnline\GISOnline\Files\Curb Ramp Inspection Form for IT - Copy1.pdf"; Stream fileStream1; fileStream1 = File.OpenRead(SignDocPath); DocumentPackage documentPackage = Silanis.ESL.SDK.Builder.PackageBuilder.NewPackageNamed("ADARampInspectionFormTemp") .WithSigner(SignerBuilder.NewSignerPlaceholder(new Placeholder("PlaceholderId1"))) //.WithSigner(SignerBuilder.NewSignerPlaceholder(new Placeholder("PlaceholderId2"))) .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .FromStream(fileStream1, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(new Placeholder("PlaceholderId1")) .OnPage(1) .AtPosition(100, 140)) ) .Build(); PackageId templateId = eslclient.CreateTemplate(documentPackage); return templateId; } I have attached my code to create a template and then use it for creating the package. Do you see anything wrong in the code? Another question, if I created a template using the web interface and added the placeholders for signature, name and date. Can I call this template in my custom code to create the package? If yes do have an sample code?

Reply to: Creating the template or package give error

0 votes
I created the template and copied the code you posted. Don't we need to upload the file with the package? Each file will be different, it uses the same template but may have different field values.

Reply to: Creating the template or package give error

0 votes
I still get the same error "{"Error communicating with esl server. Invalid URI: The format of the URI could not be determined."}", my code EslClient eslclient = new EslClient(APIKey, APIUrl); string email1 = "[email protected]"; string SignDocPath = @"C:\Projects\DigitalSign\SampleCode\GISOnline\GISOnline\Files\42891.pdf"; string packageid = "b8fe3288-822d-4128-859c-a702450cdd5a"; Stream fileStream1; fileStream1 = File.OpenRead(SignDocPath); DocumentPackage newPackage = Silanis.ESL.SDK.Builder.PackageBuilder.NewPackageNamed("ADARampInspection:" + DateTime.Now) .DescribedAs("ADA Ramp Inspection") //.WithEmailMessage(PACKAGE_EMAIL_MESSAGE2) .WithSigner(Silanis.ESL.SDK.Builder.SignerBuilder.NewSignerWithEmail(email1) .WithFirstName("Raji") .WithLastName("Abraham") .WithTitle("Reviewer") .WithCompany("City Of Sacramento") .WithCustomId("Signer1")) .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings() .WithoutInPerson()) //.WithoutDecline() //.WithoutOptOut() //.WithWatermark() //.Build()) .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .FromStream(fileStream1, DocumentType.PDF)) .Build(); PackageId templateId = new PackageId(packageid); PackageId packageId = eslclient.CreatePackageFromTemplate(templateId, newPackage); //Error at this line DocumentPackage retrievedPackage = eslclient.GetPackage(packageId); eslclient.SendPackage(packageId);

Reply to: Creating the template or package give error

0 votes
I tried creating a simple package. I get the same error. EslClient eslclient = new EslClient(APIKey, APIUrl); string email1 = "[email protected]"; string SignDocPath = @"C:\Projects\DigitalSign\SampleCode\GISOnline\GISOnline\Files\42891.pdf"; Stream fileStream1; fileStream1 = File.OpenRead(SignDocPath); DocumentPackage newPackage = Silanis.ESL.SDK.Builder.PackageBuilder.NewPackageNamed("ADARampInspection:" + DateTime.Now) .DescribedAs("ADA Ramp Inspection") .WithSigner(Silanis.ESL.SDK.Builder.SignerBuilder.NewSignerWithEmail(email1) .WithFirstName("Raji") .WithLastName("Abraham") .WithTitle("Reviewer") .WithCompany("City Of Sacramento") .WithCustomId("Signer1")) .WithDocument( DocumentBuilder.NewDocumentNamed( "First Document" ) .FromStream( fileStream1, DocumentType.PDF ) .WithSignature( SignatureBuilder.SignatureFor( email1 ) .OnPage( 1 ) .AtPosition(100,300) )) .Build(); PackageId packageId = eslclient.CreatePackage(newPackage); eslclient.SendPackage(packageId); The document has 2 pages and the signature should be on the second page.

Subscriptions

Topics Replies Freshness Views Users
I have a requirement to create a package which have multiple documents. First Document will be pdf document and other documents can be pdf or images. If it is possible can any send me a sample code.
4 7 years 11 months ago 50
Profile picture for user mwilliams
I took the sample code .net code (c#) from online and was getting the below error when creating a template and package. "Could not create template. Exception: Error communicating with esl server.
17 5 years 8 months ago 302
Profile picture for user Duo_Liang
Profile picture for user harishaidary

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.