I am currently working on a project that is requiring me to embed a Topaz signature image into a HTML page. I know that this is possible if the image has been changed into a base64 string but the string value that the signature is returning is a "ASCII hex string". Does anyone have code that will display an embedded "ASCII hex string"? Thanks.
Below is an example string I found that will embed a red dot into a page and it works perfect.
<html>
<head>
<title>Display Image</title>
</head>
<body>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot">
</body>
</html>
Below is the string that is being returned from the signature pad. (I'm sorry but its really long.)
<html>
<head>
<title>Display Image</title>
</head>
<body>
<img src="data:image/png;base64,3331330D0A310D0A353333203137360D0A353331203137380D0A353238203138320D0A353234203
139300D0A353138203230320D0A353132203231350D0A353036203233310D0A353031203234390D0A343935203237300D0A34
3839203239340D0A343834203332300D0A343738203334390D0A343731203338310D0A343636203431350D0A3436312034353
00D0A343538203438360D0A343536203532310D0A343537203535310D0A343539203537360D0A343634203539320D0A343731
203630320D0A343739203630360D0A343838203630360D0A343938203630350D0A353130203630320D0A353232203539350D0
A353335203538340D0A353439203536370D0A353635203534360D0A353831203532300D0A353939203439310D0A3631372034
36300D0A363335203432370D0A363533203339330D0A363730203335390D0A363836203332360D0A373032203239330D0A373
136203236330D0A373239203233340D0A373339203230390D0A373438203138360D0A373534203136360D0A37353820313439
0D0A373630203133360D0A373630203132350D0A373539203131370D0A373536203131310D0A373532203130370D0A3734372
03130340D0A373432203130340D0A373336203130360D0A373239203130390D0A373232203131360D0A373133203132350D0A
373034203133370D0A363934203135320D0A363833203137310D0A363733203139320D0A363633203231360D0A36353420323
4320D0A363437203236380D0A363431203239360D0A363337203332340D0A363335203335310D0A363335203337370D0A3633
37203430320D0A363431203432340D0A363436203434330D0A363534203436300D0A363633203437330D0A363734203438330
D0A363836203439300D0A373030203439340D0A373134203439350D0A373238203439340D0A373434203439310D0A37363020
3438360D0A373736203437390D0A373933203437310D0A383130203436300D0A383237203434380D0A383435203433340D0A3
83632203431380D0A383830203430310D0A383938203338320D0A393135203336320D0A393331203334310D0A393437203332
300D0A393631203239380D0A393734203237380D0A393836203235380D0A393935203233390D0A31303033203232330D0A313
03037203230380D0A31303039203139360D0A31303039203138360D0A31303035203137380D0A393939203137330D0A393931
203137310D0A393831203137300D0A393639203137320D0A393536203137350D0A393430203138310D0A393234203138380D0
A393037203139360D0A383930203230360D0A383733203231370D0A383536203233300D0A383430203234340D0A3832352032
35390D0A383131203237360D0A373939203239340D0A373738203331320D0A373630203333310D0A373433203335310D0A373
238203337310D0A373336203339330D0A373436203431350D0A373539203433360D0A373735203435350D0A37383320343733
0D0A373933203438390D0A383035203530330D0A383230203531330D0A383337203532310D0A383537203532350D0A3837382
03532350D0A393031203532310D0A393235203531330D0A393530203530320D0A393735203438380D0A31303031203437300D
0A31303238203435300D0A31303535203432390D0A31303832203430360D0A31313039203338330D0A31313335203336300D0
A31313630203333370D0A31313833203331340D0A31323033203239330D0A31323230203237330D0A31323335203235350D0A
31323435203233380D0A31323532203232340D0A31323534203231310D0A31323533203230310D0A31323438203139320D0A3
1323430203138360D0A31323238203138330D0A31323133203138320D0A31313937203138350D0A31313739203139300D0A31
313630203139380D0A31313339203231300D0A31313138203232360D0A31303936203234340D0A31303735203236360D0A313
03534203239310D0A31303334203331380D0A31303135203334370D0A393938203337380D0A393831203431310D0A39363720
3434350D0A393535203438300D0A393434203531340D0A393337203534340D0A393331203537300D0A393237203538390D0A3
93236203630310D0A393235203630370D0A393237203630390D0A393330203630390D0A393335203631300D0A393432203630
390D0A393531203630370D0A393633203630320D0A393736203539340D0A393933203538320D0A31303131203536360D0A313
03331203534370D0A31303533203532350D0A31303736203530320D0A31313030203437370D0A31313234203435300D0A3131
3439203432320D0A31313734203339330D0A31313938203336340D0A31323230203333340D0A31323431203330340D0A31323
539203237340D0A31323734203234360D0A31323838203231380D0A31323939203139320D0A31333038203136390D0A313331
34203134380D0A31333138203133310D0A31333230203131360D0A31333230203130360D0A313331382039390D0A313331352
039350D0A313331322039350D0A313330362039380D0A31333030203130350D0A31323931203131370D0A3132383120313333
0D0A31323730203135340D0A31323539203137390D0A31323437203230370D0A31323335203233380D0A31323233203237310
D0A31323133203330350D0A31323033203334310D0A31313935203337360D0A31313838203431310D0A31313833203434330D
0A31313739203437330D0A31313738203439390D0A31313739203532310D0A31313832203533390D0A31313836203535320D0
A31313933203536300D0A31323032203536340D0A31323133203536330D0A31323237203535360D0A31323433203534350D0A
31323631203532390D0A31323830203530380D0A31333031203438340D0A31333233203435350D0A31333435203432340D0A3
1333639203339310D0A31333933203335370D0A31343135203332320D0A31343336203238380D0A31343536203235350D0A31
343734203232330D0A31343930203139340D0A31353033203136370D0A31353133203134340D0A31353230203132350D0A313
53234203131300D0A31353236203130300D0A313532362039340D0A313532342039320D0A313531392039320D0A3135313220
39350D0A31353033203130300D0A31343931203130390D0A31343737203132320D0A31343632203133390D0A3134343520313
5390D0A31343237203138330D0A31343039203230390D0A31333932203233370D0A31333734203236370D0A31333538203239
380D0A31333433203332390D0A31333331203336310D0A31333232203339310D0A31333136203431390D0A313331322034343
50D0A31333132203436370D0A31333135203438370D0A31333230203530330D0A31333239203531350D0A3133343020353233
0D0A31333535203532370D0A31333732203532370D0A31333931203532320D0A31343132203531340D0A31343335203530320
D0A31343539203438360D0A31343835203436380D0A31353130203434380D0A31353336203432360D0A31353631203430340D
0A31353834203338310D0A31363035203335390D0A31363235203333370D0A31363431203331360D0A31363536203239350D0
A31363637203237370D0A31363736203236300D0A31363832203234350D0A31363836203233330D0A31363836203232320D0A
31363834203231340D0A31363831203230380D0A31363736203230340D0A31363638203230320D0A31363630203230330D0A3
1363439203230360D0A31363335203231320D0A31363230203232310D0A31363032203233340D0A31353834203235300D0A31
353635203237300D0A31353436203239320D0A31353238203331380D0A31353130203334360D0A31343934203337360D0A313
43738203430360D0A31343635203433370D0A31343534203436380D0A31343436203439370D0A31343432203532360D0A3134
3431203535310D0A31343432203537320D0A31343435203538370D0A31343439203539350D0A31343530203539380D0A31343
530203539380D0A31343530203539370D0A300D0A000000000000000000000000000000000000000000000000000000000000
00000000" alt="Signature">
</body>
</html>
Just wanted to let everyone know that the Topaz sig string is a proprietary format and is not an image. All you need to do is store the sig string somewhere. Then when you want to display the signature later just create an ActiveX object on the page you want to display it then just set the sig string to the stored value.
This is the HTML page I wrote. Hope it helps the next person looking for the same thing. :)
Also just a reminder that this is an ActiveX so it will only work in IE.