This question has been flagged
6 Replies
38820 Views

When ever Print button is clicked, Save as Dialog appears.User has to save the pdf file and open it then print. If the task is print, why user should go through so many steps?

Is there any way to Print directly to Default Printer if Print button is pressed?

Thank you

Avatar
Discard
Author

Hi Naresh, The previous one I want to open as PDF file directly instead of Save as Prompt. This one Print Directly without generating PDF. This two are different. Thanks

Anand ! I edited the title ! So no more confusion. :-D

Don't know how, but this video shows exactly what we need: http://www.youtube.com/watch?v=7PPrVxgJ934 . Says the module will be released soon

Hello,

This module may be helpful to you. User wise print or open the report.
https://apps.odoo.com/apps/modules/14.0/shvm_report_options/

Best Answer

Sure, you can instantly print any Odoo report (PDF or ZPL) without saving it via the Odoo Direct Print app - https://bit.ly/ODP15

Avatar
Discard
Best Answer

You can use base_report_to_printer

Avatar
Discard
Best Answer

Reports are PDF-files, and you have to open them one way or another to print them.

It is not needed to save the PDF-files, just open them and click on print or use CNTR-P.

On my Windows machine, I can right-click on a PDF-file (a saved one), and select the option 'Print'.

Maybe someone made or will make an extention to print from within the browser, this might be Javascript. That will solve your question.

Avatar
Discard

"Maybe someone made or will make an extention to print from within the browser, this might be Javascript. That will solve your question." I consider such an extension as mandatory for printing POS receipts with any dot printer (they can not print pdf files nor images); see http://help.openerp.com/question/3916/printable-payment-receipts-in-openerp-7/

Best Answer

We tried IE and Chrome browsers but Firefox was best and can be set to preview instead of download. The PDF loads in the browser window and then you just 'right click' print or 'file->print'...

I think that the problem sometimes occurs when the web server you are downloading the PDF from does not serve the PDF with the correct MIME type.

When the web server serves a PDF with the correct MIME type, Chrome previews it. When the web server serves a PDF with the incorrect or generic MIME type (application/octet-stream), Chrome downloads it.

If the server returns a Content-Type of text/html Chrome will display/open the PDF directly in the browser. However, if the server returns a Content-Type of application/pdf then the browser will prompt the user to save/download the PDF.

I found this code on stackoverflow that maybe could be used in openErp: open(PDF, "the.pdf") or die "could not open PDF [$!]"; binmode PDF; my $output = do { local $/; <pdf> }; close (PDF);

print "Content-Type: application/pdf\n"; print "Content-Length: " .length($output) . "\n\n"; print $output

Avatar
Discard

Source: http://superuser.com/questions/219870/how-to-open-pdf-in-chromes-integrated-viewer-without-downloading-it

Best Answer

CNTR-P is something we can't send to customers. Printing directly is one of the important feature everyone wants it. I hope OpenERP team will consider this as one of the core needs.

Avatar
Discard

We tried another SAAS web based system before choosing openErp and they had direct printing. We had to load some software (print server software) onto one of the PC machines in the local network. This solution worked great on the PC machines and even from the Windows handheld devices (WinCE web application on handheld motorola symbol machines)

What "print server software" did you use @john? CUPS? was that on a windows or linux server?

Best Answer

For windows clients, we use filetypesman, from http://www.nirsoft.net/utils/file_types_manager.html

Then we change the default action for pdf files to "print", and that at least saves the user a couple clicks each time...

There are also a couple modules that enable direct printing.  Just search the web and you will find them (but I think most are not updated to v8+ )

Finally, for POS clients, we install a POSBox and enable direct printing from POS client...

Regards,

-Mario

Avatar
Discard