vbuch / node-signpdf

Simple signing of PDFs in node.
MIT License
696 stars 175 forks source link

ERROR ReferenceError: Buffer is not defined (in angular 10) #97

Closed phmjunior closed 3 years ago

phmjunior commented 4 years ago

Hi,

When I call the sign() with the parameters, the following error returns

ERROR ReferenceError: Buffer is not defined
    at SignPdf.sign (signpdf.js:38)
    at TicService.getCliente (tic.service.ts:29)

I did the following test, creating a Buffer to access the method

const caminho1 = '%appdata%/Microsoft/SystemCertificates/My/Certificates';
    const caminho2 = '%appdata%/Microsoft/SystemCertificates/My/Certificates';
    const a = Buffer.from(caminho1);
    const b = Buffer.from(caminho2);

    const assinado = signer.sign(a, b);
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had activity in the past 90 days. It will be closed if no further activity occurs. Thank you for your contributions.