frios Posted March 6, 2019 Share Posted March 6, 2019 Is there someone who know how to capture the signature from a mobile?? I've been trying to apply javascript libraries for several days, but, or d'ont work or I can not get them to communicate with Unigui to send them to database. I really need it. Any idea will be welcome. Thanks in advance Quote Link to comment Share on other sites More sharing options...
M.Ammar Posted March 7, 2019 Share Posted March 7, 2019 hi I was searching for the same thing I found this post, I didn't try it yet but I kept it to test later Quote Link to comment Share on other sites More sharing options...
frios Posted March 7, 2019 Author Share Posted March 7, 2019 (edited) Thank you, From your message I have reached another, where there is an example, which I had already seen, but it did not work correctly. I suppose the versions of the library were not correct. I added a call to a function that was missing ... and to work. I enclose the corrected example in case it serves you. regards Felix Edit: I have put the component libraries in a post below mobile_sig_test.zip Edited January 22, 2021 by frios More text 3 Quote Link to comment Share on other sites More sharing options...
AntonioM Posted May 2, 2019 Share Posted May 2, 2019 I can't download the mobile_sig_test.zip file. Could anyone send it to me? atm@antoniotorregrosa.es THX in advance Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 2, 2019 Share Posted May 2, 2019 Hello, Sorry, which edition and build of UniGUI are you using? Quote Link to comment Share on other sites More sharing options...
neo4a Posted May 2, 2019 Share Posted May 2, 2019 On 3/7/2019 at 11:32 AM, frios said: Thank you, From your message I have reached another, where there is an example, which I had already seen, but it did not work correctly. I suppose the versions of the library were not correct. I added a call to a function that was missing ... and to work. I enclose the corrected example in case it serves you. regards Felix mobile_sig_test.zip Hi Felix, I'm trying to run your project but get several error messages ("resizeCanvas is not defined" etc.). Can you please include your CustomFiles to your project: files/signature_pad.js files/points.js files/app.js files/css/signature-pad.css Thank you. Quote Link to comment Share on other sites More sharing options...
molla2005b Posted May 3, 2019 Share Posted May 3, 2019 https://github.com/szimek/signature_pad you can find them here Quote Link to comment Share on other sites More sharing options...
neo4a Posted May 3, 2019 Share Posted May 3, 2019 1 hour ago, molla2005b said: https://github.com/szimek/signature_pad you can find them here Thank you. Found this already and several other ones but none of them are working with demo project provided above. BTW, most recent version of sources in linked project are TypeScript (.ts) files. Quote Link to comment Share on other sites More sharing options...
andyhill Posted May 3, 2019 Share Posted May 3, 2019 When you get this to work correctly on Mobile UniGUI please share test project - thanks. Quote Link to comment Share on other sites More sharing options...
frios Posted January 22, 2021 Author Share Posted January 22, 2021 a little late but I see that the libraries have changed, so I put the ones used in the example. Sorry everyone, but I rarely enter the forum files.zip 1 Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted April 30, 2022 Share Posted April 30, 2022 Thank you for your example, it helps me very much. Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted May 1, 2022 Share Posted May 1, 2022 So, saving signature to file works fine but I canno make loading from file and displaying in HTMLFrame. I have got following code to reverse save operation img := TUnimImage.Create(self); DM.ZapSel.FieldByName('PODPIS').SaveToFile(podpisName + 'podpis.png'); img.Picture.LoadFromFile(podpisname + 'podpis.png'); stream := TBytesStream.Create(); img.Picture.Graphic.SaveToStream(stream); base64s := EncodeBase64(Stream.Memory, stream.Size); UniSession.AddJS('ajaxRequest('+ signFrame.JSName +', "_loadimg", ["_src="+signaturePad.fromDataURL("data:image/png;base64,'+ base64s + '")])'); stream.Free; FreeAndNil(img); I see in debug that base64s variable has the samevalue as saved previosuly image. It looks that ajaxRequest is causing a problem. After this I got a message "Invalid or unexpected token" from my Application. So I have found a solution to remove CRLF after encoding to base64 base64s := StringReplace(base64s, #$D#$A,'',[rfReplaceAll]); and now I have got a message "Cannot read properties of undefined (reading 'fromDataURL')" Any tip for that? Thanks for any help? Quote Link to comment Share on other sites More sharing options...
Marlon Nardi Posted May 2, 2022 Share Posted May 2, 2022 Hi @MarBar77 If you are interested, you can check out my signatures component, compatible with web, mobile and developed with the Smooter Signatures technology https://demos.falconsistemas.com.br/?tela=tfrmsignature https://store.falconsistemas.com.br 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.