Hello! I'd really love some help with this, if you could!
I work for a meeting/event planning company and we handle conferences and meetings and deal with Registration and name badge printing. Our goal is to be able to Print Name badges from a registration form of some kind that can also save the data in some file format or ideally write to a database.
Here is an example form that is an example of how it could look (a conference attendee enters the info on the first page, continues and inserts the record into the database, then clicks “Print” on the final page):
I've been trying to come up with a solution from the SDK files installed on my PC by the Dymo program and separate SDK files but the problem is that I can’t figure out how to tell the Dymo printer what data is in those information fields in the form.
Is there a way to map the HTML form fields to the Dymo printer? I created a custom label and set the input fields for variable data so what am I missing to connect the HTML Form to the printer output?
This is the javascript file included with the SDK information for the Dymo LabelWriter 400 turbo:
<<<<<<<<<<<<<<<<<<<<<
<html>
<head>
<title>Label Printing Demo</title>
</head>
<body>
<h1>JavaScript Label Printing Demo</h1>
<form>
<INPUT TYPE="BUTTON" NAME="PrintBtn" VALUE="Print Label" OnClick="PrintBtnClicked()">
</form>
<SCRIPT>
function PrintBtnClicked()
{
var DymoAddIn, DymoLabel;
DymoAddIn = new ActiveXObject('DYMO.DymoAddIn');
DymoLabel = new ActiveXObject('DYMO.DymoLabels');
if (DymoAddIn.Open('C:\\Documents and Settings\\All Users\\Documents\\DYMO Label\\Label Files\\Address (30252, 30320, 30572).LWL'))
{
DymoLabel.SetAddress(1, 'Pablo Martini1\nSAMPLE Corporation\n333 W. Fantasy World\nSantaland, NP 99999-9999');
DymoAddIn.Print(1, true);
// this is how to print to the "Right Roll" of a TwinTurbo
//DymoAddIn.StartPrintJob();
//DymoAddIn.Print2(1, false, 1); // 0 = left roll, 1 = right roll, 2 = auto-switch
//DymoAddIn.EndPrintJob();
}
else if (DymoAddIn.Open('C:\\Program Files\\DYMO Label\\Label Files\\Address (30252, 30320, 30572).LWL'))
{
DymoLabel.SetAddress(1, 'Pablo Martini1\nSAMPLE Corporation\n333 W. Fantasy World\nSantaland, NP 99999-9999');
DymoAddIn.Print(1, true);
// this is how to print to the "Right Roll" of a TwinTurbo
//DymoAddIn.StartPrintJob();
//DymoAddIn.Print2(1, false, 1); // 0 = left roll, 1 = right roll, 2 = auto-switch
//DymoAddIn.EndPrintJob();
}
else if (DymoAddIn.Open('C:\\Program Files\\Dymo Label\\Label Files\\Address (30252, 30320).LWT'))
{
DymoLabel.SetAddress(1, 'Pablo Martini2\nSAMPLE Corporation\n333 W. Fantasy World\nSantaland, NP 99999-9999');
DymoAddIn.Print(1, true);
// this is how to print to the "Right Roll" of a TwinTurbo
//DymoAddIn.StartPrintJob();
//DymoAddIn.Print2(1, false, 1); // 0 = left roll, 1 = right roll, 2 = auto-switch
//DymoAddIn.EndPrintJob();
}
else
alert('Error: Label file Not Found!');
}
</SCRIPT>
</body>
</html>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
The above line "DymoLabel.SetAddress" function seems to be the key or place where I'd put the objects or form data fields, but I'm clueless. Can anyone help, please?
Thank you for your help!
I work for a meeting/event planning company and we handle conferences and meetings and deal with Registration and name badge printing. Our goal is to be able to Print Name badges from a registration form of some kind that can also save the data in some file format or ideally write to a database.
Here is an example form that is an example of how it could look (a conference attendee enters the info on the first page, continues and inserts the record into the database, then clicks “Print” on the final page):
I've been trying to come up with a solution from the SDK files installed on my PC by the Dymo program and separate SDK files but the problem is that I can’t figure out how to tell the Dymo printer what data is in those information fields in the form.
Is there a way to map the HTML form fields to the Dymo printer? I created a custom label and set the input fields for variable data so what am I missing to connect the HTML Form to the printer output?
This is the javascript file included with the SDK information for the Dymo LabelWriter 400 turbo:
<<<<<<<<<<<<<<<<<<<<<
<html>
<head>
<title>Label Printing Demo</title>
</head>
<body>
<h1>JavaScript Label Printing Demo</h1>
<form>
<INPUT TYPE="BUTTON" NAME="PrintBtn" VALUE="Print Label" OnClick="PrintBtnClicked()">
</form>
<SCRIPT>
function PrintBtnClicked()
{
var DymoAddIn, DymoLabel;
DymoAddIn = new ActiveXObject('DYMO.DymoAddIn');
DymoLabel = new ActiveXObject('DYMO.DymoLabels');
if (DymoAddIn.Open('C:\\Documents and Settings\\All Users\\Documents\\DYMO Label\\Label Files\\Address (30252, 30320, 30572).LWL'))
{
DymoLabel.SetAddress(1, 'Pablo Martini1\nSAMPLE Corporation\n333 W. Fantasy World\nSantaland, NP 99999-9999');
DymoAddIn.Print(1, true);
// this is how to print to the "Right Roll" of a TwinTurbo
//DymoAddIn.StartPrintJob();
//DymoAddIn.Print2(1, false, 1); // 0 = left roll, 1 = right roll, 2 = auto-switch
//DymoAddIn.EndPrintJob();
}
else if (DymoAddIn.Open('C:\\Program Files\\DYMO Label\\Label Files\\Address (30252, 30320, 30572).LWL'))
{
DymoLabel.SetAddress(1, 'Pablo Martini1\nSAMPLE Corporation\n333 W. Fantasy World\nSantaland, NP 99999-9999');
DymoAddIn.Print(1, true);
// this is how to print to the "Right Roll" of a TwinTurbo
//DymoAddIn.StartPrintJob();
//DymoAddIn.Print2(1, false, 1); // 0 = left roll, 1 = right roll, 2 = auto-switch
//DymoAddIn.EndPrintJob();
}
else if (DymoAddIn.Open('C:\\Program Files\\Dymo Label\\Label Files\\Address (30252, 30320).LWT'))
{
DymoLabel.SetAddress(1, 'Pablo Martini2\nSAMPLE Corporation\n333 W. Fantasy World\nSantaland, NP 99999-9999');
DymoAddIn.Print(1, true);
// this is how to print to the "Right Roll" of a TwinTurbo
//DymoAddIn.StartPrintJob();
//DymoAddIn.Print2(1, false, 1); // 0 = left roll, 1 = right roll, 2 = auto-switch
//DymoAddIn.EndPrintJob();
}
else
alert('Error: Label file Not Found!');
}
</SCRIPT>
</body>
</html>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
The above line "DymoLabel.SetAddress" function seems to be the key or place where I'd put the objects or form data fields, but I'm clueless. Can anyone help, please?
Thank you for your help!