vbuch / node-signpdf

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

Put text or image when sign Document #128

Closed espositovitor closed 3 years ago

espositovitor commented 3 years ago

I would like to know if is possible to put text or image when sign.

We have the widget constructor in pdfkitAddPlaceholder.js file

const widget = pdf.ref({
        Type: 'Annot',
        Subtype: 'Widget',
        FT: 'Sig',
        Rect: [0, 0, 0, 0],
        V: signature,
        T: new String(signatureName + (fieldIds.length + 1)), // eslint-disable-line no-new-wrappers
        F: 4,
        P: pdf.page.dictionary, // eslint-disable-line no-underscore-dangle
    });

And I understand when change de "React" parameter is possible to put de signature visible in the page, but it's only a blank rectangle. I can use another config is this case to put text or image?

vbuch commented 3 years ago

The library only cares of signing. You would need somethig else to place a visual element. I see people use pdflib for that and other pdf midifcations, so maybe check it out.

espositovitor commented 3 years ago

Thanks @vbuch for answer me. I will try!