Title: Signature Capture Post by: Paul M. on October 29, 2020, 04:50:25 pm Hi all,
We have a requirement to capture a customers signature on a mobile device. So Neil Martin pointed me to the webcomponent demo that is part of the mobile demo program. This works fine. The problem I have is saving the input so I can add it as an image as part of a report later on. So had a look on the net and came across this function: Code
And called from 4gl: Code
And res looks like this : Code
I can then transfer it to the server and do a base64 --decode data > data.svg I have no knowledge of javascript or html so just asking anyone with any experience is this a resonable way to go about getting the signature to a file? Thanks. Title: Re: Signature Capture Post by: Reuben B. on October 29, 2020, 09:18:09 pm Have a look at https://github.com/FourjsGenero/wc_signature
That signature web component had the ability to save and view the signature as an image rather than as a sequence of MoveTo, LineTo instructions Title: Re: Signature Capture Post by: Paul M. on October 30, 2020, 09:52:42 am Thanks Reuben that does what i need. Any idea on how to make the yellow area bigger? as its a little small. Running on android mobile with gbc. Title: Re: Signature Capture Post by: Reuben B. on November 02, 2020, 01:13:16 am Paul,
It is a case of setting height/width attributes of the canvas node inside the webcomponent. Inside app.js there is a method resizeCanvas() but I'm not 100% convinced it is ever called and so the canvas element inside the WebComponent has its default width of 300 and height of 100 Reuben |