Coder Social home page Coder Social logo

Comments (3)

teymour avatar teymour commented on May 18, 2024 1

Thanks you !

The signature field is detected as a data fields by pdftk :

$ pdftk document_prepared_with_signatureField.pdf dump_data_fields output /dev/stdout 
---
FieldType: Signature
FieldName: Sig1
FieldFlags: 0
FieldJustification: Left

With data fields pdf, the action menu could be transform in field menu : the user could enter the different fields of the pdf.

from signaturepdf.

teymour avatar teymour commented on May 18, 2024

Good idea ! If you can share a PDF with this kind of feature, it whould help :)

from signaturepdf.

Kyoku57 avatar Kyoku57 commented on May 18, 2024

Hi,

You'll find 3 versions of the PDF.

The script in Quick'n'Dirty mode :

  • copy the document.pdf to document_prepared_with_signatureField.pdf
  • launch the python script (needs pip install pyhanko)
from pyhanko.sign.fields import SigFieldSpec, append_signature_field
from pyhanko.pdf_utils.incremental_writer import IncrementalPdfFileWriter

with open('document_prepared_with_signatureField.pdf', 'rb+') as doc:
    w = IncrementalPdfFileWriter(doc)
    signature_field = SigFieldSpec(sig_field_name="Sig1", on_page=0, box=(50,50,300,80))
    append_signature_field(w, signature_field)
    w.write_in_place()

Your file is updated with a empty Signature Field named Sig1
image

In Acrobat, if you click on it, you can sign with a qualified device, or with a "Visual Signature" qualified by Adobe (no legal value but it's works here). With an API, you can sign the signature field (with a linked device, or a keystore .. that contains the private key and certificate needed to sign ;-))

For this kind of stuff, you need to use a private key somewhere to "sign" you signature Field, so ... you need to realize this signature with a backend service or a YubiKey/Browser capability.

I'm not sure is the principale aim of your cool tool, but if you are interesting in go deeper with electronic signature ....

image

:D

from signaturepdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.