NetTalk Central

Author Topic: NT 9 app, print to Seiko label printer?  (Read 5924 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
NT 9 app, print to Seiko label printer?
« on: March 05, 2016, 08:42:38 AM »
I'm getting ready to try this but thought I would post to see if anyone has any thoughts...is this possible or not possible.  I have prototyped the functions for the Seiko SLP SDK and all works well in a standard desktop app.   I now want to see if a NT 9 app will be able to print to a locally attached Seiko SLP.  Anyone have any experience or thoughts on this?

Thanks,

Jeff King

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: NT 9 app, print to Seiko label printer?
« Reply #1 on: March 08, 2016, 09:48:38 PM »
Locally Connected?
As in locally connected to the browser?
Does the SDK work in JavaScript?

cheers
Bruce

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: NT 9 app, print to Seiko label printer?
« Reply #2 on: March 09, 2016, 07:46:59 AM »
Bruce,

     Thanks for the response.  When I say locally attached, I mean attached to the workstation.  I guess that can also mean attached to the browser running on the workstation as well.  My need is the following:  I want to print a PDF and associated labels, preferably without the user having to click "print" for each, but I would be OK with this approach.  The PDF is filled using QuickPDF and I have prototypes for the label printer SDK.  Some of the same data filled on the PDF will be printed on the labels.  I don't know if the SDK will work with JavaScript...I'll look into this.
     I'm looking at various articles on NetTalk Central about downloading files, and some of the example apps that also deal with downloads.  I'm struggling a bit to bring all this together.

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: NT 9 app, print to Seiko label printer?
« Reply #3 on: March 10, 2016, 01:40:48 AM »
typically browsers have very little control over a local user's printer.
And certainly there's no way to "auto print" that I'm aware of, without them pressing a Print button.
(that would be a fairly large security hole if you think about it, for browsers.)

cheers
Bruce

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: NT 9 app, print to Seiko label printer?
« Reply #4 on: March 10, 2016, 08:56:41 AM »
Bruce,

     I see what you mean now.  I am Ok with displaying the PDF in a browser first, and then letting the user print from there.  So, I have a method I think should work.  I have populated a variable with the full path to the PDF that is created in my reports folder.  I placed this variable in the URL field of the On Click tab for a button on my browse.
     I have a procedure routine created to  open a blank PDF and fill it in using QuickPDF.  The resulting PDF is sent to the reports folder.  The problem I have at this point is the page referred to in the URL is called and opened before my procedure routine code is run.  I have not been able to find the appropriate embed to call this routine from, before the URL page is opened.  Can you suggest how I might accomplish this? 

Thanks,

Jeff

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Resolved - Re: NT 9 app, print to Seiko label printer?
« Reply #5 on: March 10, 2016, 05:32:00 PM »
Bruce,

    Thanks for the help so far.  I have accepted that we will not be able to print directly to a printer on the local machine.  Opening the PDF in a browser is a good solution and I have that working now.
    I still can't get the "ServeDocument" technique to work for me, so for now I'm using Javascript to open a new browser tab with the PDF.  Here is a sample of my code:

 Do CreatePDF  !!runs routine to fill pdf with data
 myURL = 'https://tumoroid.breasthealthcrisp.org/reports/'&Clip(myFileName)&''''
 myURL = ''''&myURL
 myScript = 'window.open('&Clip(myURL)&', ''_blank'');'
 p_web.script(myScript, 1)

    This works very well.  However, I would still like to get the ServeDocument method to work.  I think I have all the pieces of the puzzle, but not sure how to put it all together just yet.

    Now on to the Seiko Label printer.  Writing directly to it will not work.  The SDK does have a method for a "virtual printer driver", which creates an image of the label and copies this to the clipboard.  I think I might be able to grab this locally and print to the label printer.
    Another thought is to create a locally running app that contains a web service.  The web service could poll the data and download info for the label printer.  I want to print the labels just after a PDF form is printed.  I think this is going to be a challenge!  Anyone have any other suggestions for this phase of the project?

Thanks,

Jeff King

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: NT 9 app, print to Seiko label printer?
« Reply #6 on: March 13, 2016, 10:16:17 PM »
probably a good idea to chat about this at the next user group webinar.

cheers
Bruce