Embedding ASCII hex string SigString into HTML page, not base64

折月煮酒 提交于 2019-12-02 03:30:12

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.

<HTML>
<HEAD>
<TITLE>SigPlus Example</TITLE>

<table border=1 cellpadding="0" height="100" width="300">
  <tr>
    <td height="1" width="368"> <OBJECT classid=clsid:69A40DA3-4D42-11D0-86B0-0000C025864A height=100
            id=SigPlus1 name=SigPlus1
            style="HEIGHT: 100px; LEFT: 0px; TOP: 0px; WIDTH: 300px" width=300
            VIEWASTEXT>
 <PARAM NAME="_Version" VALUE="131095">
 <PARAM NAME="_ExtentX" VALUE="4842">
 <PARAM NAME="_ExtentY" VALUE="1323">
 <PARAM NAME="_StockProps" VALUE="0">
            </OBJECT>
      </td>
  </tr></table>

<SCRIPT LANGUAGE=javascript>
<!--

function onClear(){
SigPlus1.ClearTablet();
}
function onBringBackSig(){
SigPlus1.JustifyMode=5
SigPlus1.SigCompressionMode = 1;
SigPlus1.SetAntiAliasParameters(1, 600, 700);
SigPlus1.SigString = "0500440001026E0100FF01FF02FE02FE01FD01FD00FD01FD00FC00FC00FB00FBFEFAFDF9FBF8FAF9FAF8F8F9F6F9F5FAF3FBF2FDF100F103F205F207F309F50AF70BFA0BFC0B000B040C080B0C0B0F0B120A1308130811060F070B05070605070206FE08FB09F709F40AF009EF0AED08EE07EF05F002F301F4FFF5FDF9FCFBFCFDFC01FB02FD01FE01FF0000000013003F022B0100000001FF04FF06FE0BFB0EFA11FA14F816FA17F916FC15FE12FF0F000A0003000100FF13003402D900FFFFFFFEFEFDFEFEFFFEFFFF01FF010003020302050405060707060702030202FFFF00008B019302730100FFFF0000FEFEFEFEFDFFFDFEFDFFFCFEFDFDFCFDFCFCFCFAFDFAFEFA00F902F905F908F80AF80EF80FF910FA10FC0F000C030806050A010BFE0DFA0EF60EF30DF00DF10BF008F306F404F802FB00FD00000003FF07000AFE0FFD11FC14FA15F916F916F913F911F90EFA0BFA08FB05FB04FC00FD00FFFD00FB02F803F605F305F207F109EE0BEE0CED0DEC0DED0DEE0BF109F407F606FA04FC03FE0200010300040007FE0AFD0CFD0DFD0FFE0EFF0E000C000B02080206030503030401050006FE06FB06F805F604F404F303F103F004EF04F005F204F304F702F902FD02FF010201050007FE0AFE0BFD0DFD0DFC0FFD0FFE0FFF0C000B0008020602050304030304030401040104FF03FF01FE01FF02FE01FD02FD02FC04FB04FA04FA04F904F806F707F709F709F709F708F807FA04FA03FC02FE01FE020001FF00000000FE02FD03FB06F909F90CF70EF810F810F80FFC0EFD0C000A0307040605030501060005FD06FB07F906F707F607F405F404F203F202F301F301F601F801FC01FE00FF0000FF03FD05FD08FC0AFC0CFE0DFD0CFF0DFF0B00090008020604040503070108FF07FC08FB08F907F709F509F50AF20AF209EF0AED08EC07EA07EA07EA08EB08ED06F105F603F900FDFFFFFE00FD02FD05FB07FB0BFB0FFA12FA14FA17F919FA19FC18FF150012030E040B0308040504040403060006FF07FC07FA07F807F506F405F206F107F106F006F205F403F702FA00FCFFFFFF02FE04FE08FD0AFC0DFA0EFB0EFB0FFD0EFF0D010B02090407040505030502060107FF07FD09FB09F80AF708F508F506F307F305F306F405F405F604F902FB01FE00FFFF02FF04FF07FE09FD0AFD0CFD0BFD0CFF0AFF0A00090108030503040503050108FE08FD0AFA0BF90CF60BF60BF30AF309F308F208F408F607F706FA04FD01FE0000FF03FD04FD08FC0AFC0BFB0DFB0CFB0DFB0EFC0DFE0C000B0409060709050C020D0010FD11FA12F714F713F412F410F20BF109F206F203F400F8FEFAFCFFF802F507F30BF10EF111F212F712F910FE0E030B07080B060F03130016FD1AFA1BF71CF61AF618F414F610F60CF707FC02FE00000002000010005A031C0106FE10FD1BFC26F92DF831F733F534F734F832FA2FFA23FD0EFE0600FD0000000000000000000000000000000000000000000000000000000000000000000000";
//be sure to match SigCompressionMode, EncryptionMode, and AutoKey usage with your own captured signature
}

//-->
</SCRIPT>
</HEAD>
<BODY>

<FORM id=FORM1 method=post name=FORM1>
<p>
<INPUT id=SignBtn name=SignBtn type=button value="Bring Back Signature" language ="javascript" onclick=onBringBackSig()>&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT id=button1 name=ClearBtn type=button value=Clear language ="javascript" onclick=onClear()>&nbsp;&nbsp;&nbsp;&nbsp

</p>
</FORM>
</BODY>
</HTML>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!