Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

3

How do I open PDF file directly while printing instead of Save as Prompt?

By
Anand
on 4/10/13, 11:06 AM 4,745 views

When ever a Print button is pressed, PDF file is generated and Save Dialog Appears. I want PDF file to be opened directly so that user can print instead of Save as Prompt.

How to implement this?

Which OpenERP version are you using?

Francesco OpenCode
on 4/10/13, 1:20 PM

I am using OpenERP 7

Anand
on 4/11/13, 12:17 AM

which browser?

Andrea Cometa
on 4/11/13, 6:54 AM

Is it browser dependent? I have tried with Chrome.

Anand
on 4/12/13, 1:21 AM

firefox can be set to 'view' instead of download. The problem occurs when the web server (openerp software) 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

john
on 4/17/13, 10:17 AM

How to verify if my PDF have the right MIME type? I can't autosave PDF in chromium.

Pascal Tremblay
on 12/19/14, 10:29 AM

to verify MIME type of a file : http://mime.ritey.com/

Pascal Tremblay
on 12/19/14, 10:38 AM
1
mid123
On 2/13/14, 5:20 AM

Hi you can use web_pdf_viewer module for your purpose

This module does not seem to be available through the OpenERP module installation interface in v7. Wil it eventually get there and if so when?

Gilles Lehoux
on 2/14/14, 9:54 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 4/10/13, 11:06 AM
Seen: 4745 times
Last updated: 3/16/15, 8:10 AM