Jump to content


Photo

Signature Capture


  • Please log in to reply
34 replies to this topic

#21 Bocchi

Bocchi

    Member

  • uniGUI Subscriber
  • PipPip
  • 30 posts

Posted 17 May 2017 - 02:47 PM

Ok, thanks!


  • 0

#22 MarkLince

MarkLince

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 81 posts

Posted 21 May 2017 - 01:43 PM

Hi,

On the mainform set fullscreen to false. I found that fixes it, but the mainform will get a border. I have no idea why it is happening, as I said I don't use unimobile yet (other than this simple test). Its not an issue with in my desktop implementation.

Regards

Mark


  • 0

Delphi xe7

uniGUI Complete - Professional Edition V1.00 1402


#23 Bocchi

Bocchi

    Member

  • uniGUI Subscriber
  • PipPip
  • 30 posts

Posted 22 May 2017 - 04:25 PM

Unfortunately in my project I can't change the fullscreen property of the mainform.

Is there another way to solve the problem?


  • 0

#24 MarkLince

MarkLince

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 81 posts

Posted 23 May 2017 - 10:06 AM

Hi Bocchi,

I'm sure there must be, although I couldn't find it, I'm no expert here and am still learning Uni myself. I wish I had more time to help you debug it but I don't at the moment.

Maybe one of the more experienced guys on here can help out a bit. 

Good luck with it and when things ease off for me I'll take another look but hopefully you will have solved it by then.

Regards

Mark


  • 0

Delphi xe7

uniGUI Complete - Professional Edition V1.00 1402


#25 Bocchi

Bocchi

    Member

  • uniGUI Subscriber
  • PipPip
  • 30 posts

Posted 23 May 2017 - 10:16 AM

I solve my problem by adding this line:

UniSession.AddJS( 'setTimeout(resizeCanvas, 1000);' );
 
Best regards.

  • 0

#26 MarkLince

MarkLince

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 81 posts

Posted 23 May 2017 - 03:35 PM

Hi Bocchi,

That's great, well done... I'll keep that workaround in mind.

Regards

Mark


  • 0

Delphi xe7

uniGUI Complete - Professional Edition V1.00 1402


#27 gerhardhziegler

gerhardhziegler

    Member

  • uniGUI Subscriber
  • PipPip
  • 45 posts
  • LocationVienna and Berlin

Posted 03 July 2017 - 06:14 PM

Hi Mark! What a great example! Will try to use it in my code (signature for cleaners) today.
I hope I am welcome with questions ;-)

 


  • 0

#28 MarkLince

MarkLince

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 81 posts

Posted 05 July 2017 - 09:43 PM

Hi,

Thanks, you are welcome.

Mark


  • 0

Delphi xe7

uniGUI Complete - Professional Edition V1.00 1402


#29 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 697 posts

Posted 07 July 2017 - 05:39 PM

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.


  • 0

#30 MarkLince

MarkLince

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 81 posts

Posted 11 July 2017 - 12:28 PM

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


  • 0

Delphi xe7

uniGUI Complete - Professional Edition V1.00 1402


#31 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 697 posts

Posted 14 July 2017 - 12:09 PM

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.

 

 

 


  • 0

#32 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 697 posts

Posted 15 July 2017 - 08:04 PM

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.


  • 0

#33 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 697 posts

Posted 16 July 2017 - 08:57 AM

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;
}
 


  • 0

#34 logisticasoft

logisticasoft

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 205 posts

Posted 15 October 2017 - 03:48 PM

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


  • 0

Carlos Ramirez

ramirez.carlos@yahoo.com


#35 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 697 posts

Posted 16 October 2017 - 09:07 AM

ok.

 

this is my test. is enough for me.

 

 

Attached Files


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users