Capturing Signature from a Tablet PC to notes document?

Hai Everyone,

     We have a notes application running on Tablet PC. We have to capture signature of the customers into the notes document and display/print it with the receipt. We can capture the signature using the Input Panel of the Tablet PC. But how do we transfer it to the notes document and how do we store it ( using rich text ?? ). 

I need to know

  1. How to transfer the signature image from the Input Panel to the notes document.

  2. How to store it in notesdocument and use it for display.

I searched this forum and couldn’t find exact answers to achieve this. If you have had this kind of functionality in yr apps, please suggest me with a solution. Thanks.

Raj

Subject: Capturing Signature from a Tablet PC to notes document ?

Rajesh,

Google “microsoft digital ink”. You use Microsoft’s OLE control in a rich text field to capture the signature.

Subject: RE: Capturing Signature from a Tablet PC to notes document ?

Thanks Dave. So once the signature is captured on the Input Panel, just clicking the Insert button will transfer the signature to the richtext lite field which has the OLE option set ? Will it transfer the signature “AS IS” or will it try to convert it to text ?

Or should i use any programatical approach to transfer the signature from the Input Panel to notes rich text field.

Please let me know.

Thanks a million.

Subject: RE: Capturing Signature from a Tablet PC to notes document ?

Like I said - Google on Microsoft Digital ink and your questions will be answered. You may want to consult the Notes help file on using OLE objects in Notes applications if you are not familiar with how to do it.

Subject: RE: Capturing Signature from a Tablet PC to notes document ?

Thanks Dave. Will do that now.

Raj

Subject: Dave i am lost

Dave, i went through the Microsoft Ink articles and i am lost currently. Can u just outline where to start and the steps please. Based on my understanding

  1. i have to use the 2 Ink Dlls for this functionality. “Microsoft.Ink.Dll” & “Microsoft.resources.Dll”.

  2. use the Ink classes for capturing Ink strokes etc.

But i don’t know where to start. I tried creating a Object in the Notes form with “Ink Picture” control and i couldn’t use Ink(drawing signatures) on this object.

Could you please guide me with the initial few steps. It will be of great help Dave.

Thanks a million.

Raj

Subject: RE: Dave i am lost

Hey Raj,

It was quite a while ago I did this so my memory is a but foggy. Unfortunately it was working for a pervious employer so I don’t have access to the source code any more. Here is what I do recall:

  1. If you are developing this on a desktop PC you must install the tablet SDK on it otherwise your input control will not do anything. You can scribble all over it with the mouse and nothing will happen. Simply just copying and referencing the DLL files in your form will not work. If you are developing on a tablet PC then this is not an issue.

  2. You need to use the InkPicture class rather than the InkEdit because the InkEdit tries to covert everything it can to text. (Looks like you already figured this one out).

  3. You need to use a button or something similar to grab the contents of the InkEdit control and copy them to a rich text field. From what I recall I cheated and used the clipboard/copy/paste. It is possible to get the InkEdit control to serialize its contents to GIF or JPEG format or something so that you can insert it into the rich text field yourself, but I found it much simpler to just copy the InkEdit’s contents to the clipboard and then paste them into the rich text control using standard NotesUIDocument methods.

  4. Your button code just needs to get an instance handle to the InkPicture (using EmbeddedObjects collection of the form), then it can call any of the InkPicture’s methods and read/write its properties.

  1. The InkPicture control will capture and display its contents without any programming at all. Simply adding it to the form design like you already tried should be enough to get the basic functionality up and working.

If this advice does not help you, please get back to me with the exact roadblock you are running into now and I will attempt to help you solve it if I can. I am by no means an expert on this so I cannot make any promises about how effective I can be helping you.

Subject: RE: Dave i am lost

Thanks a lot Dave. That was a real good explanation. The first thing i was doing wrong was trying Ink Picture control in a Windows XP Laptop(after copying the DLL’s alone) and transfering the design to the Tablet PC(as there was no designer in the Tablet PC). I installed the designer in tablet pc and now i am able to get the basic signing features working. I will work on using the classes tommorow and will get back to you with an update.

Again thanks a million for all yr help and time.

Thanks,

Raj

Subject: RE: Dave i am lost

Hi Dave, atlast i got sometime to play with the Ink classes and i m currently looking at ways to

1) save the signature captured in the "InkPicture" control to save it to a richtext item or as an image file. 



For this when i looked at yr solution of copying the clipboard into notes i couldnt find methods directly from the Microsoft.InkPicture class. I couldnt reference to other Microsoft.Ink classes to get the "Savefile" or the "clipboard" methods. I also couldn't refer the "Microsoft.Ink" classes in the Options section of the form as it would'nt accept it. 



How did u interlink microsoft.Inkpicture and other microsoft.ink classes to achieve this copying to clipboard / saving to a bmp/jpeg file ? 

Please let me know. Thanks for yr time again.

Subject: RE: Dave i am lost

Consult the help file entry for the GetObject function.

Subject: Thanks Dave

Dave, I finally got this working. Thanks a billion for all yr help. I really appreciate your help with this regards. Good Luck with yr future endeavours.

Raj

Subject: RE: Thanks Dave

Hi Raj,I am trying to achieve the same exact thing: copy/paste the image to a Rich Text field programatically and I just cannot make it work with the GetObject function… Would you be so kind and post your script (or email me) that achieves this?

Thank you so much, Zoltan

Subject: RE: Thanks Dave

Zoltan, i am away from my PC. i will respond to this on monday. Email me if by anychance i forget.

Raj

Subject: RE: Thanks Dave

Zoltan, This is the code i am using to copy and paste the image to the richtext field.

Set signObj = uidoc.GetObject(“Microsoft InkPicture Control”)

Set inkobj = signObj.Ink()

Call inkobj.ClipboardCopy() 'Calling Ink copy method

Call newuidoc.GotoField(“Signattach”) ’ Richtext field

Call newuidoc.Paste()’ Uidocs paste method

Subject: You are God!

Thank you so much!! It is so simple yet difficult to piece it together. Appreciate it. Best - Zoltan

Subject: RE: Thanks Dave

No problem. I am happy to help. Glad it worked out well for you.