Options

Printer status from NAV5.1

CrunchCrunch Member Posts: 37
Is it possible to check a printers status from NAV? I'm thinking some sort of automation perhaps (which I don't have much experience with)
Using NAV5.1

I'm using SHELL and Foxit to print to several Network printers, but I'd like to check status on the printers before sending the print job. Just a simple offline/online status.

Answers

  • Options
    vaprogvaprog Member Posts: 1,125
    There are some .vbs scripts on windows machines which use WMI to query, configure and manipulate printers. You might find what you need in there. One that probably provides the info you need is called prncnfg.vbs. You need to call it from a command line console window using cscript.exe to examine it's operation.
  • Options
    CrunchCrunch Member Posts: 37
    Thank you so much. I'm looking into it now. Will report back, how it goes.

    One thing, that puzzles me, is, how will I receive the status "answer" in NAV?
  • Options
    CrunchCrunch Member Posts: 37
    I can't seem to find anything, I can use in the .vbs scripts.

    Perhaps it would be sufficient to just ping the network printer first. How would I recieve the reply, if I do this via SHELL? Any other way to ping in NAV?
  • Options
    vaprogvaprog Member Posts: 1,125
    If you have a network printer that has a web interface, you might be able to use XMLHTTPRequests to fetch a status page and analyze it.

    To use ping, you ether need a version of ping that returns a non-null exit value on failure (standard microsoft windows ping does not) or redirect it's output and analyze the generated output.

    A port scanner might be better suited for the task than ping.
  • Options
    CrunchCrunch Member Posts: 37
    vaprog wrote:
    If you have a network printer that has a web interface, you might be able to use XMLHTTPRequests to fetch a status page and analyze it.

    ......
    This worked. Thank you so much.
  • Options
    AngeloAngelo Member Posts: 180
    is there a way to let Navision know that you have printed successfully (not network printer)?
Sign In or Register to comment.