Submitted this to the wrong forum, moved it here.....

I am building an Intranet Site for my company. The component I am working on now is a service ticket system where technicians will enter customer information into a form and after some basic validation using javascript and then with PHP on ther server side, the form will need to be printed so the customer can sign it right there at the counter.

The system I am replacing uses a MS ACCESS Database and a basic form. once you enter the information, you hit the save button, the form then auto-prints. This of course is using the MS Access database application and not any web-based tie-in.

I know you can print using javascript, but it opens the print dialogue and you still have to hit OK in order for the page to print.

Is there an easier or better way? The technicians want the system to just print once the ticket is generated. Is that even possible using a web interface like this?

    It may be possible having the browser do that by using an applet. Otherwise, the best you can do is open the print dialogue. However, you could also have your php script send stuff to the printer directly, but that means you'd need to create two documents, one without markup for printing, and one with markup for use in a browser.

      johanafm;10937921 wrote:

      but that means you'd need to create two documents, one without markup for printing, and one with markup for use in a browser.

      Not necessarily. For example, one you generate the appropriate HTML, you could use dompdf to create a PDF document, and then send that PDF to a printer queue.

        Or (just googling here) html2fpdf so that the same HTML that is displayed is also used to generate the PDF.

          bradgrafelman;10937974 wrote:

          Not necessarily. For example, one you generate the appropriate HTML, you could use dompdf to create a PDF document, and then send that PDF to a printer queue.

          As I see it, that's still creating two documents.

            Write a Reply...