Сертификати


        $.get("http://127.0.0.1:5339/api/certificate/list", function (certificates) {
            $.each(certificates, function (index, certificate) {
                data.certificates.push(certificate);
            });
        });
    
    
  1. {{ certificate.commonName }}
{{selectedCertificate}}
Филтриране на сертификати
{{egn}}
Данните в момента се поддържат само на латиница
Причина
Контакт
Място
Избор на местоположение на подпис (rectangle/ annotation
Избор на страница First/Last
Координатна система Bottom (bottom/left) или Top(top/left)
Правоъгълник

    $.ajax({
        url: 'http://127.0.0.1:5339/api/certificate/signPdf',
        contentType: 'application/json; charset=utf-8',
        dataType: 'text',
        data: JSON.stringify({ contents: data.pdf, options: {}, thumbprint: thumbprint }),
        type: 'POST',
        success: function (res, textStatus, jqXHR) {
                        let result = JSON.parse(res);
                        data.signedPdf = result.contents;
                    },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert(textStatus + errorThrown);
        }
    });

    
PDF file.pdf

    $.ajax({
        url: 'http://127.0.0.1:5339/api/certificate/verify',
            contentType: 'application/json; charset=utf-8',
            dataType: 'text',
            data: JSON.stringify({ xml: data.signedPdf }),
            type: 'POST',
            success: function (verifyResult, textStatus, jqXHR) {
            if (verifyResult) {
                data.verifyResult = 'Проверката е успешна';
            }
            else {
                data.verifyResult = 'Проверката е неуспешна';
            }
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert(textStatus + errorThrown);
        }
    });

    
{{verifyResult}}