PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → Printing to a local printer from a browser
Printing to a local printer from a browser
Iniciado por Gautam, 03,dic. 2014 10:52 - 3 respuestas
Publicado el 03,diciembre 2014 - 10:52
Hi All

I wanted to know how to print a report in webdev to a local printer. In other words how can a web user print a report to a printer connected to his local machine? The filedisplay command seems to allow user to view or download the report but how can I get the printer dialog box to show up as soon as the report is displayed in the user's browser so he can print to a printer connected locally on his machine?

Thanks and regards

Gautam
Publicado el 03,diciembre 2014 - 11:23
Hi Gautam

As this function is browser specific, you'll need to use some JS code
if you really want to do that and it may not work in all browsers...

But most of the time, giving the report as a pdf and letting them either
look at it, save it, or print it is the easiest solution (and also
offers the user the chance to save it as a pdf for archival)

Best regards


--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com


On 12/3/2014 4:52 AM, Gautam wrote:
Hi All

I wanted to know how to print a report in webdev to a local printer. In
other words how can a web user print a report to a printer connected to
his local machine? The filedisplay command seems to allow user to view
or download the report but how can I get the printer dialog box to show
up as soon as the report is displayed in the user's browser so he can
print to a printer connected locally on his machine?

Thanks and regards

Gautam
Publicado el 15,diciembre 2014 - 15:21
Thanks Fabrice

Sorry for the late response as I was away on holiday.

I am generating the report as a pdf currently and allowing the user to save it or display it. Is it possible to open the pdf in a new browser window? The problem with display is if the user closes the display window it closes the entire web application. So the user would have to click on the back button of the browser to get back to the web application after viewing the report.

Gautam
Publicado el 15,diciembre 2014 - 15:32
Hi Gautam

yes it is.. Just change the button target in the button settings (at the
bottom of the first tab)

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com


On 12/15/2014 9:21 AM, Gautam wrote:
Thanks Fabrice

Sorry for the late response as I was away on holiday.

I am generating the report as a pdf currently and allowing the user to
save it or display it. Is it possible to open the pdf in a new browser
window? The problem with display is if the user closes the display
window it closes the entire web application. So the user would have to
click on the back button of the browser to get back to the web
application after viewing the report.

Gautam