There has been a lot of interest in digital signatures lately. There is also a fledgling DocuSign module; it's pretty built-out and the developer is responsive.

I'm going to create a fillpdf_docusign/Fill PDF DocuSign Integration sub-module to accomplish this. I'm not exactly sure how things will flow yet, but in vague terms, after the PDF is generated, the user will be directed to DocuSign in an <iframe> so they can sign the completed PDF. I think PDF templates might have to use a DocuSign widget to indicate where they should be signed, but maybe not, since DocuSign the service has good PDF support.

In writing this, though, I see two ways in which this would flow: a query-string-overridable setting on the Fill PDF editing screen (would require the override digital signature setting permission) and through Rules. The Rules action would basically make sure that the digital signing setting was turned on, and maybe more - but that's the start.

Should the user have to save the PDF to a file to use this functionality? Not sure. There will at least be a temporary file in the mix. But should a download be initiated right after the document is retrieved from DocuSign? It seems silly to go through that whole process and maybe miss the download and have to do it again. So should there be a "signed documents" page? Should that be a default view instead? Should it be expanded into a view of files saved by Fill PDF, like mentioned in another issue (#1606828: Expose FillPDF metadata to Views)? I think that download-on-return should be supported in some way in case the user doesn't want to use the list of filled PDFs - maybe just through them using docusign_rules and setting up an action initially.

I'll update this issue summary with a better spec once I have gotten into things a bit.

Comments welcome. In fact, if you need this feature, please comment on how you would expect it to work!

Comments

wesnick’s picture

Hi, developer of DocuSign module here:

A quick overview of docusign:

Envelope (the package)
-Documents (one or many documents to sign)
-Recipient (one or more people who will sign one or more of the documents)
-Tabs (one or more places where the user has to input data or sign; they reference recipient and document)

Currently, you can build this envelope manually, or you can declare a "template" of sorts in hook_docusign_documenu_info() and use the builder function docusign_envelope_build();

You can just send the envelope without requesting a token with ->sendEnvelope() and on a subsequent page load the envelope and request a token URL with ->getTokenURL(), or do both in one shot with ->sendEnvelopeGetToken(). It probably would not be difficult to load the iframe via ajax right in the form, but it sort of makes sense to require a form submission before loading the iframe.

There are a few different signing modalities that you can use:

  • Single Embedded Signer (IFrame based, doc is complete after signing)
  • Embedder Signer, with Account Holder to Sign after (doc is waiting for you in you Docusign Inbox) -- this is the one in the example module
  • Remote signer (just an email is sent to the recipient)

Some things that should be addressed for integration with FillPDF:
-How to handle multiple documents?
-How to handle non node or webform data sources?
-DocuSign probably needs some kind of template manager, or the ability to add/edit templates in the UI.

wizonesolutions’s picture

wesnick: Thanks for the input! This is extremely helpful, and I feel like I have a better conceptual grasp of DocuSign now.

Regarding the things to address:

Multiple documents: What do you mean? Only one PDF gets generated at a time, which seems like it'd work OK with the current functionality of DocuSign.

Non-node/webform data sources: Well, that's kind of a Fill PDF issue and is contingent on it gaining entity support. But I don't think this would hinder integration. My thought is to generate the PDF and save it as a file, and then tell DocuSign to get that signed.

Template manager: I agree on this one. It would make integration easier as well, since then I could base the logic (what kind of signing modality, for example) around an existing DocuSign template rather than having to implement separate ways to handle that in Fill PDF DocuSign Integration.

luf’s picture

This would be a fantastic module addition. In this manner people who are selling services online would be able to acquire the information and signatures from their clients without having to fax or email and receive documents.

I hope you are able to build this project to completion, and good luck!

wizonesolutions’s picture

Thanks for the encouragement! Yeah, I hope it works out well too. It'd certainly lead to a bit more Fill PDF Service business, which in turn would free me up to work on the module more. I looked at DocuSign's plans, and they're pretty affordable too, so that shouldn't be a barrier (as opposed to struggling to figure something custom out and reinvent the wheel).

jaspher’s picture

Would it be possible/ easier to create digital signatures using tcpdf instead of docusign? I'm not a developer so other than price, I wouldn't know the implications of one over the other.

wizonesolutions’s picture

jaspher: TCPDF could be a possibility, although one would need to define coordinates and such. By the time you get there, you may as well have used DocuSign. DocuSign also has a module I can build off of already, so that's the main benefit.

Other signing services (like HelloSign and the RightSignature API) are candidates also. Even this is a candidate: http://drupal.org/project/signaturefield

Maybe there needs to be a digital signature API for Drupal, heh. I seem to think of everything in terms of API (case in point with http://drupal.org/project/pdf_forms). But the first goal is DocuSign, sort of as a proof of concept. If that works...then I can take it from there.

wizonesolutions’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue tags: +fillpdf2

A definite for 7.x-2.x. Not major yet because the actual underlying issues aren't created yet, and the spec is not yet complete.

kbell’s picture

Hi wizone! We met at Princeton DrupalCamp last year - sat next to each other at the signup table and talked shop all afternoon... Good to see you're building this module!!

I'd like to vote for NOT using DocuSign. Just because it's paid/proprietary. As I've found with other services of this nature, once everyone is using it, they can make the pricing be whatever they want - they have a captive audience! I think signaturepad is a good alternative btw.

I know you feel like you might be reinventing the wheel, but remember: you're reinventing it as FOSS, and that makes all the difference in the world. I'm very interested in your progress on this... I have a project coming up that's going to need this functionality (but not with DocuSign). Maybe Gotham City Drupal can support some work on this module?

Thanks again for working on this!

wizonesolutions’s picture

Title: Integrate with DocuSign Drupal module (comments wanted) » Integrate with digital signature service or technology (comments wanted)

kbell: Yeah, we tweet all the time. How could I forget? :)

OK, I've updated the title. I might still do DocuSign, but it's good to know some other opinions. SignaturePad actually looks really cool. I have had requests for SignatureField before, which looks to actually make use of SignaturePad.

Patches and sponsorship always welcome. http://fillpdf-service.com/contact for the latter.

Seph’s picture

I have been doing a lot of research on this as well. Inkdit has an API https://inkdit.com/ as well as SignNow https://signnow.com/

I echo what was said above. All of these services have an API, but you don't get access to it unless you are going for volume and their highest priced plans. I have one document that I would like to be able to securely sign on my website.

It would be awesome to have something to implement directly through Drupal. You can open a document and sign it in an iframe with https://hostmypdf.com , but the interface is a little clumsy.

wizonesolutions’s picture

Seph, thanks for your comments. Good to know.

To do a non-hosted solution, I'll have to make image filling work with more than just LiveCycle ImageFields in FillPDF (should be possible), so it's a win-win. I think that this will happen within the next few months.

Definitely will be a hard-hitting feature in a good way, I think.

noahzenzen’s picture

This would be a fantastic feature. I needed to have this feature on some forms that I have clients fill out on the website and am using the "Signature Field" module. It works great but my one complaint is I can't have it be a required field (even if required is checked).

Right now I don't have the need to have people sign the pdf that gets generated but I could easily see that coming down the road.

zanymonster’s picture

I would LOVE to hear you adopt the SignatureField module and get it working with image stamping in Fill PDF!!!!! I would also probably use a service, but would really prefer not to need one!

SchwebDesign’s picture

This is very exciting, but looks like it may have been put on the back burner?

Wouldn't an ideal way to do this be integration with https://www.drupal.org/project/signaturefield ? I haven't used that, but it seems that even simple documentation for how to make the two work together could suffice. From what i understand the signaturefield module saves the signature as a transparent PNG; theoretically couldn't we just use FillPDF's image stamping functionality via JavaBridge to pull in that image on the PDF?

camprandall’s picture

I've got a simple Hellosign integration module in sandbox right now that I'm hoping to get approval on. It's my first project so it will likely take a while. Their service is impressive!

wizonesolutions’s picture

Yeah, this pretty much still needs sponsorship. I've been focusing on the Drupal 8 port of the module, but my capacity for new feature development is limited right now. Even with that, I'm not sure if I could do much before September/October. So a code contribution might be even better, e.g. sponsoring another developer to contribute to the module. That is how I got started with it myself, so it is not infeasible.

wizonesolutions’s picture

@camprandall did you ever so farther with your HelloSign module?

alibama’s picture

@camprandall = ditt0 = where dat data at?

kscheirer’s picture

You can always find people's sandboxes by checking out their user account :) https://www.drupal.org/sandbox/camprandall/2457871

Liam Morland’s picture

Version: 7.x-2.x-dev » 8.x-4.x-dev
Category: Task » Feature request
Liam Morland’s picture

Issue tags: -fillpdf2
camprandall’s picture

@wizeonesolutions - I totally missed your comment! :) As of today, our HelloSign module is reviewed and tested by the community, but still in sandbox. Here's the url: https://www.drupal.org/sandbox/camprandall/2457871

OliveIT’s picture

I have completed this with eSign module if anyone is interested in the code.

Uses JavaBridge and stamp function to fill in a digital signature (one drawn using HTML5 canvas).

wizonesolutions’s picture

@OliveIT You I'd open a feature request and post the patch (assuming it's a patch and not a separate contrib module).

DustinYoder’s picture

I posted the code I used to get this working with esign in a feature request. This is very easy, but it requires the use of the JavaBridge library for the image placement.

Liam Morland’s picture

Code mentioned in comment 25 is in #2939312: E-Sign module support.

camprandall’s picture

Just an FYI if it's helpful, we released our D8 version of the HelloSign module yesterday. It's simple, but makes it easy to get an integration up and running. https://www.drupal.org/project/hellosign

wizonesolutions’s picture

Status: Active » Fixed

OK, this is in Drupal 8 now, and I am going to make the E-Sign issue the follow-up for Drupal 7.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.