Graham Dumpleton
grahamd at dscpl.com.au
Sat Aug 12 06:24:04 EDT 2006
On 12/08/2006, at 7:22 PM, S.R.Pardá wrote: > Hi all, > > I'm considering solutions to print HTML pages served by some Linux OS > with Apache and Mod_Python. > > I am looking a server side approach, that is: I want the server > send the > HTML output when required to one of varios network printers > installed in > the server. > > I have not idea about linux printing , I would need an orientation > about > what have to know. > Are any python module for printing? > Must I execute some shell command to print inside python? > Must I generate a PostScript document from the HTML document to print > it ? > > > More details: > > Web Clients (Windows probably) will print some documents received. But > the documents have diferent formats (size, orientation, duplex option) > so it's desiderable the automatic printer/configuration selection > ( that > is: witout a printer selection dialog in IE or Firefox and the default > printer isn't valid for all documents) > > As I found in client window Javascript it's not capable of select > printers in client side, I have to investigate with VBscript, and > another possibility would be install an ActiveX control to do that > (restricting possible client options). > > So I think the server approach, would be better because it eliminates > printer management in client, and assures the same HTML render > configuration for all printings, independent of client configuration / > browser. Not sure I really understand what you are trying to do, but if your target is a printer, not sure why you would want to try and render to HTML and then print that. Your better option would be target PDF as your display format and then print the PDF file. Suggest you have a look at the following sites: http://www.openreport.org http://www.reportlab.org http://www.reportlab.com With these solutions, one option is to describe documents as RML. This can be filled out with data from some source and then translated into PDF or HTML. Thus HTML becomes a screen representation but PDF what is used for printing. If you already have the document generation side worked out, and are only really after solution for printing, not sure how Apache and mod_python comes in to it all. Anyway, hope the sites I reference might be of some help. Graham
|