private async Task Sign()
        {
            botonFirmar.IsEnabled = false;
            botonBorrar.IsEnabled = false;

            _signaturePanel.Stop();

            byte[] documentBytes = null;

            var assembly = Assembly.GetExecutingAssembly();

            using (Stream documentStream = assembly.GetManifestResourceStream("SealSignBSSClientTest.Assets.sample.pdf"))
            {
                documentBytes = new byte[documentStream.Length];
                await documentStream.ReadAsync(documentBytes, 0, (int)documentStream.Length);

                documentStream.Close();
            }

            BiometricSignatureServiceBasicClient biometricSignatureClient = new BiometricSignatureServiceBasicClient("WSHttpBinding_IBiometricSignatureServiceBasic");

            var biometricResponse = await biometricSignatureClient.BeginSignatureAsync(
                SignatureProfile.PDF,
                BiometricSignatureType.Default,
                string.Empty,
                string.Empty,
                BiometricSignatureFlags.Default,
                null,
                SignatureFlags.Default,
                null,
                null,
                documentBytes);

            var biometricState = _signaturePanel.GetSignature(biometricResponse.instance, biometricResponse.biometricState);

            var signedBytes = await biometricSignatureClient.EndSignatureAsync(biometricResponse.instance, biometricState);

            using (FileStream documentStream = new FileStream(@"d:\test\sample.signed.pdf", FileMode.Create))
            {
                await documentStream.WriteAsync(signedBytes, 0, signedBytes.Length);

                await documentStream.FlushAsync();

                documentStream.Close();
            }

            biometricSignatureClient.Close();
            _signaturePanel.Start();

            botonFirmar.IsEnabled = true;
            botonBorrar.IsEnabled = true;
        }