[python-win32] win32print.StartDocPrinter

Tim Roberts timr at probo.com
Mon Jul 11 23:04:59 CEST 2011


Anthony Sterrett wrote:
> I'm not sure how to use the wx.html.HtmlEasyPrinting module, I'm sorry
> to say. The documentation is less than helpful, although that may well
> be attributed to my newbishness over their lack of documentation.

Have you downloaded wxPython?  Did you install the wxPython demo?  There
is an example of virtually every wxPython type in that demo, including
HtmlEasyPrinting.  For more detailed help, you should probably go to the
wxPython mailing list.

> So suppose I decided to embed, say, Google Chrome into my program, to
> utilize its printing capabilities. How would I go about doing that? :3
> I've never had to embed a browser in my code before...

You'd have to go searching.  The major browsers have interfaces that let
an application get access to the same object model that Javascript code
sees, which would allow you to trigger a "print".  I'm not really
convinced that's the best way.  The browsers tend to be very, very large.

How complicated is the thing you are printing?  If you're just printing
text in a 3x5 card format, it's probably just as easy to do it with
Windows GDI calls.  You could  even create a PDF.  That's what I tend to
do, because PDFs are so universal.  When I create PDF, it looks the same
everywhere.  There are several good PDF libraries for Python.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list