Reputation: 19
I have a small dillema; I'm developing a sort of web point of sale application using python as a controller. What I need is a way to automatically print a sequence of PDF files generated and downloaded by the browser to a default physical printer. I assume most of my POS terminals will work on windows yet my application server was designed on an Ubuntu Server plataform. Any Ideas?
PS: This is a module developed as an OPENERP application
Upvotes: 1
Views: 1966
Reputation: 328594
Another solution might be to configure the browser to download the files to a certain location. A python script could watch that directory and print the files when they appear.
See this question for printing PDFs from Windows with Python: Silent printing of a PDF in Python
Upvotes: 0
Reputation: 1683
You can embed JavaScript into the PDF which can do the printing. I am not sure if you can print the file after it is being downloaded or only if the PDF is opened in the browser.
Here and here you can find more information. It also depends which browser you are using.
Upvotes: 1