Need to print directly to the default printer attached to the user PC either from the Print button in the top menu or preferably a button in the code. By direct printing i mean no dialog box.
Any ideas are very much appreciated. The page to be printed only consists of few lines of text.
and the documentation[/quote]
Thanks… did that and managed to make the menu Print button to print directly to the default printer skipping the printer dialog box. Now the client is asking to do direct printing on loading the report page, that is, no need to show the report on screen but print it directly by something like window.onload window.print but this will still use the printer dialog box even after using:
believe the client idea is good as there are too many clicks!!
do you have any idea how to do this, please?
Thanks for your support.
In the mean time, i did the following procedure and this is printing the page before the current one and is showing the dialog box will print automatically without pressing any keys. hope i managed to explain well
can you please let me know what i am doing wrong?
I forgot to ask: are you using Chromium or Trident engine?
Trident engine. Managed to solve the dialog box issue, that is, not showing but the problem is that when calling this code it will not print the current page from where the code is called but a previous one!!
How are you calling your HEScript directPrint procedure? Maybe it is not in the correct event, and is triggered before the webpage you want to print is correctly configured.
am calling this in the PHP code in the last part of the page that i need to print:
directPrint is the name of the new script i did and directPagePrint is the name of the procedure (code shown before)
BTW… have changed the name of the procedure from directPrint to directPagePrint. did this so that the name of the script and the name of the procedure will be different!!
It’s not the problem: you are calling the script from a PHP script. This means that the page has to be printed while you are generating its HTML code… Thus, it’s the previous page that is printed.
Hi I had similar problems. Except that instead of printing the previous page bu the printers prints my parent window.
I’m trying this great tool named ExeOutPut for PHP, because I’m very interested to buy a copy.
I’m facing a print problem and I’m not able to solve it.
I didn’t found any example how can I print a page directly to printer, and this example in this post didn’t work out for me.
Sorry bother you, friends. Unfortunately, I don’t have any idea how to do it.
Thanks in advanced.
The window.print() function works. Or you can use php print functions, as described in this topic or with some search: