I am creating a new solution that needs to be able to print address labels easily & directly.
Luckily my client has bought DYMO label printers & DYMO offer a JS Framework to allow printing to their Label Printers from a web browser
http://developers.dymo.com/2010/06/02/dymo-label-framework-javascript-library-samples-print-a-label/
with test page at
http://www.labelwriter.com/software/dls/sdk/samples/js/PrintLabel/PrintLabel.html
This worked for me to my DYMO from Safari.
I now need to somehow embed that in my NG client solution & get it to print.
I tried creating an HTML Area (set to editable) on a form & putting the 'PrintLabel.html' code in a form variable that I set as data provider for HTML Area & it displays correctly & allows me to enter some text, but when I click on the 'Print' button, it just enters the word 'Print' in the button & doesn't do anything.
If I change the HTML area to 'not editable', the HTML doesn't display correctly & nothing works.
The HTML is very simple
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Print a Label</title>
<script src = "http://labelwriter.com/software/dls/sdk/js/DYMO.Label.Framework.latest.js" type="text/javascript" charset="UTF-8"> </script>
<!--<script src="../../../dymo.label.framework.js" type="text/javascript" charset="UTF-8"> </script>-->
<script src = "PrintLabel.js" type="text/javascript" charset="UTF-8"> </script>
</head>
<body>
<h1>DYMO Label Framework JavaScript Library Samples: Print Label</h1>
<div id="textDiv">
<label for="textTextArea">Label text:</label><br/>
<textarea name="textTextArea" id="textTextArea" rows="5" cols="40"></textarea>
</div>
<div id="printDiv">
<button id="printButton">Print</button>
</div>
</body>
</html>
but how can I get that to work somehow on a Servoy form, with me passing a records field(s) to it to print that address??
Unfortunately I think there is a real problem with the fact that NG client cannot do any printing, as of course it is the best way to migrate to an up to date client solution, but people still need to print...
If I can't get this to work, I will have to switch this client to another product, as they don't want to use Smart Client [Java] & like the UX/UI that NG offers. (i.e. modern, responsive, Bootstrap/Angular type)
Please help me to make NG work & allow me to stick with Servoy 8
Thanks
Rafi