public void Pdf_ConvertAndSign_Tests() { try { pdfService.ConvertToSomeFormat("pdf-sample.pdf", PDFDocumentConvertFormat.Html, Utils.CloudStorage_Input_Folder, Utils.Local_Output_Path + "pdf-html-out.html"); pdfService.ConvertToSomeFormat("pdf-sample.pdf", PDFDocumentConvertFormat.Html, Utils.CloudStorage_Input_Folder, Utils.CloudStorage_Output_Folder + "/pdf-html-out.html"); pdfService.ConvertToSomeFormat("pdf-sample.pdf", PDFDocumentConvertFormat.Doc, Utils.CloudStorage_Input_Folder, Utils.Local_Output_Path + "pdf-doc-out.doc"); pdfService.ConvertToSomeFormat("pdf-sample.pdf", PDFDocumentConvertFormat.Doc, Utils.CloudStorage_Input_Folder, Utils.CloudStorage_Output_Folder + "/pdf-doc-out.doc"); #region Sign document storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/pdf-sample.pdf", Utils.CloudStorage_Output_Folder + "/pdf-signed.pdf"); PDFSignature signature = new PDFSignature(); signature.SignaturePath = Utils.CloudStorage_Input_Folder + "/signature.pfx"; signature.SignatureType = "PKCS7"; signature.Password = "******"; signature.Appearance = Utils.CloudStorage_Input_Folder + "/signature.jpg"; signature.Reason = "Success"; signature.Contact = "*****@*****.**"; signature.Location = "Australia"; signature.Visible = true; signature.FormFieldName = "Signature1"; signature.Authority = "Aspose Marketplace"; signature.Rectangle = new Rectangle(100, 100, 200, 200); signature.Date = DateTime.Now.ToString(); pdfService.SignDocument("pdf-signed.pdf", Utils.CloudStorage_Output_Folder, signature); storageService.File.DownloadFile(Utils.CloudStorage_Output_Folder + "/pdf-signed.pdf", Utils.Local_Output_Path + "/pdf-signed.pdf"); #endregion Sign document } catch (Exception ex) { Assert.Fail(ex.Message); } }