Jump to content

Signature Capture


Harry Rogers

Recommended Posts

  • 1 month later...

Hi.

 

This is really good.

 

I don't know how to do some things and don't find info. can hep?

 

- chage the color of the signature

 

- when saving (i.e. as png), can store the signature in some location in the server with a given name?

 

- how tyo resize and change the position of the pad? I piut into an htmlframe, but allways have margins.

 

Thanks.

Link to comment
Share on other sites

Hi,

easiest way to save the png is to save it from the unimimage like;

 

unimimage.picture.savetofile('YourPath/YourFilename.png')

 

The other changes require some interaction with the js of the jquery control, I will look at that for you over the next few days, I'm  very busy at the moment.

Regards

Mark

Link to comment
Share on other sites

ok.

 

the color is changing this line in signature_pad.js:

 

    this.penColor = opts.penColor || 'black';

 

there, I can define the color. I changed black for blue, and works.

 

 

The saving of the picture, I supose that must be changing something here in app.js, but I don't know what:

 

savePNGButton.addEventListener("click", function (event) {
    if (signaturePad.isEmpty()) {
        alert("Please provide signature first.");
    } else {
        window.open(signaturePad.toDataURL());
    }
});

 

Thanks.

 

 

 

Link to comment
Share on other sites

Ok. Done. change color and save picture to a file.

 

I only need to align the pad into the htmlframe. now, the pad has allways margins, and don't find where I have to make the changes.

 

Some help.

 

Thanks.

Link to comment
Share on other sites

Ok. Done. Playing with the css:

 

.m-signature-pad {
  position: absolute;
  font-size: 18pt;
  width: 100%;
  height: 100%;
  border: 5px solid #e8e8e8;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.08) inset;
  border-radius: 4px;
  border-color: black;
}
 

Link to comment
Share on other sites

  • 2 months later...

Ok. Done. Playing with the css:

 

.m-signature-pad {

  position: absolute;

  font-size: 18pt;

  width: 100%;

  height: 100%;

  border: 5px solid #e8e8e8;

  background-color: #fff;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.08) inset;

  border-radius: 4px;

  border-color: black;

}

 

 

 

 

 

hi, it is possible to place a complete example so that we can all have the signatures process ? thanks

Link to comment
Share on other sites

  • 2 years later...
  • 2 years later...
×
×
  • Create New...