• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Printing From the Scada

    How-To
    3
    7
    2.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Bhanner
      last edited by

      Hi,
      Does anyone know if it's possible to print either the current page of a scada either with a button on screen or based on tag change?
      Kind Regards
      Billy

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by phildunlap

        Hi Billy,

        I'm not sure what you mean, 'print'. Mango has reporting built in that creates files of data. There is not currently an event handler to trigger a report, but you can trigger reports from a scripting environment so it is possible. You can then print these files if you want to get data out. The pages themselves are only known to Mango as code, it takes a browser to render the code for a page to become a page.

        I think every browser supports printing the page you have open if you press control P, but there is no access to a browser from the Mango environment. In a dashboard you may be able to call print() and figure out how to programmatically get your browser to print its current display. It's probably possible, but I'm not sure.

        I believe every major desktop operating system will have some kind of printscreen.

        If you can explain more what you mean by "print the current page of scada" I may be able to advise better.

        B 1 Reply Last reply Reply Quote 0
        • B
          Bhanner @phildunlap
          last edited by Bhanner

          @phildunlap
          Hi,
          The system is to log who is in the building on a graphical screen which in the event of a fire needs to be sent to a already configured printer at the press of a button so an easy rollcall can be done,
          Hope that's cleared things up
          Regards
          Billy

          Jared WiltshireJ 1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ
            Jared Wiltshire @Bhanner
            last edited by

            @Bhanner

            You can create a component which will call window.print() - https://developer.mozilla.org/en-US/docs/Web/API/Window/print

            However it will still popup the print dialog before printing.

            Developer at Radix IoT

            B 1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by

              I can't say I've ever delved into that problem, but it's not impossible for printers to have a protocol you could interact with using TCP/IP and scripting data sources. Maybe your printer supports PJL? Or perhaps LPD? (I just learned what those were)

              1 Reply Last reply Reply Quote 0
              • B
                Bhanner @Jared Wiltshire
                last edited by Bhanner

                @jared-wiltshire
                Hi,
                I'm a bit new to this with the custom components how would i go about writing the code for it? the tutorial you linked is a little unclear on how th code would actually work? i'm just after making a button you would press to call up the printer dialog?
                Regards
                Billy

                1 Reply Last reply Reply Quote 0
                • Jared WiltshireJ
                  Jared Wiltshire
                  last edited by Jared Wiltshire

                  Actually, you can make it a lot easier than that. You could just set the onclick attribute of your button for this use case.

                  e.g.

                  <ma-button raised="true" label="Print" onclick="window.print()"></ma-button>
                  

                  You can add some custom CSS to hide the top bar when printing -

                  @media print {
                      .ma-ui-main-toolbar {
                          display: none !important;
                      }
                  }
                  

                  Developer at Radix IoT

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post