hummusRecipe icon indicating copy to clipboard operation
hummusRecipe copied to clipboard

Error in method encrypt, userPassword not recognize

Open ClauRuizR opened this issue 2 years ago • 3 comments

Screen Shot 2021-08-03 at 10 22 45 AM

ClauRuizR avatar Aug 03 '21 14:08 ClauRuizR

So do mine

GuoliangWang avatar Aug 07 '21 05:08 GuoliangWang

I am also getting same error. By doing this:

pdfDoc
    .encrypt({
        password: '123',
        ownerPassword: '123',
        userProtectionFlag: 4
    })
    .endPDF();

error is gone but encryption is not working.

mateenkiani avatar Feb 28 '22 02:02 mateenkiani

As a workaround you can add ts-ignore.

pdfDoc
    .encrypt({
        //  @ts-ignore
        userPassword: '123',
        ownerPassword: '123',
        userProtectionFlag: 4
    })
    .endPDF();

mateenkiani avatar Mar 01 '22 05:03 mateenkiani