Printing to DYMO Label Printer

Forum to discuss the new web client version of Servoy.

Printing to DYMO Label Printer

Postby rafig » Wed Oct 03, 2018 7:14 pm

Hi all,
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 :wink:

Thanks

Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Printing to DYMO Label Printer

Postby rafig » Wed Oct 03, 2018 7:48 pm

Well, in reply to my own post, I thought I'd try a bunch of the other NG components & just before giving up I tried the 'Embedded YouTube' one, put in the demo/sample URL (2nd one in post above) & it worked!!!

So, Servoy, please can you create a more generic version of that component that can be placed on a form & passed a data provider that would replace (in this example the text area) something in the HTML & thereby allow some kind of printing??
(I am NOT an expert on Component creation, so would be wary about tweaking the Youtube component to do this myself)

Thanks

Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Printing to DYMO Label Printer

Postby swingman » Tue Oct 09, 2018 6:25 pm

There should really be more documentation and examples on how to create components.
And maybe some starter components for solving different kinds of problems.

I know we can go on GitHub and look at Servoy's source code, which I have done, but it takes a long time to get an understanding of how it works.
And I have still not 100% achieved what I set out to do.
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Printing to DYMO Label Printer

Postby rafig » Wed Oct 10, 2018 12:24 pm

swingman wrote:There should really be more documentation and examples on how to create components.
And maybe some starter components for solving different kinds of problems.

I know we can go on GitHub and look at Servoy's source code, which I have done, but it takes a long time to get an understanding of how it works.
And I have still not 100% achieved what I set out to do.

I completely agree.
@Servoy, some examples & more documentation, maybe a detailed webinar on it?
Thanks
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Printing to DYMO Label Printer

Postby mwiedemann » Tue Nov 12, 2019 9:19 pm

I am still trying to figure out how to make simple printing happen in the new versions of Servoy. I love the new interface capabilities and the new clients, but things that were easy in older versions of Servoy are difficult or non-existent now.

The older versions made creating simple banded reports, labels and merge documents easy. In the new versions, it seems like simple printing has just been eliminated and those of us who depend on these features have been left waiting and hoping. I really hope the good people at Servoy have something in the works, otherwise people like me are stuck.

Jasper reports seems to be the solution for some of this, but the documentation for using Jasper and Servoy together is as clear as mud. Servoy's web videos have been lacking on simple printing as well. Simple printing to label printers is something my employer can't do without and I really hope that Servoy can make that happen again. We have really gone backwards when it comes to simple printing.

My rant is done and I hope those of us that have to include printing can get some comments and ideas.
mwiedemann
 
Posts: 13
Joined: Wed Aug 05, 2015 7:05 pm

Re: Printing to DYMO Label Printer

Postby rafig » Wed Nov 13, 2019 1:46 pm

@ mwiedemann
I think that the new 'NG Desktop Client' might be what you need, when they add access to printers.
I paid for a component to be created that would allow my normal NG client solution to print to a Dymo label printer and that is working great for my client's label printing needs.
For other things, I am using Velocity to generate PDF's (an excellent solution & free)
Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 8 guests