POS Ticket with FPDF in Google Chrome

Hi friends.
I am building a POS system, and I am using FPDF 1.6 with Google Chrome, PHP 5.3.8 and jQuery Mobile.

When I make the sale, I push the button “Print” the ticket is out by the printer, printing the PDF once.

Currently, pressing the Print button displays a new tab and print the ticket, but does not close the page, allowing you to print more than once.

I need your help to achieve do it, I tried with iframe but the link to the PDF doesn’t close, but if I put anything else it closes.

Sorry for my english!

Ahh, and the script I used to close the tab:

<script type="text/javascript">
  function closeWindowMain(){
      window.open('','_self',''); 
	  window.print();
     
	  setTimeout(function(){
  window.close();
}, 1000);
  
   }
	</script>

Have you tried this?

[php][/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service