473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

printing with wxPython

Hi!
I'm using wxPython to handle my application gui.. So, I have a notebook
widget and i have to print the object inside it's tab ... Maybe doing a
preview before printing... I know that wx has many objects to handle
printing.. i've tryied to use them, but i wasn't able to... Any hint? By
now, i solved the problem saving a screenshot if the screen in an image(bmp)
and then sending it to printer... (a print preview would be cool...)
tnx
F.P.

Jul 18 '05 #1
3 4758
Fabio Pliger wrote:
Hi!
I'm using wxPython to handle my application gui.. So, I have a notebook
widget and i have to print the object inside it's tab ... Maybe doing a
preview before printing... I know that wx has many objects to handle
printing.. i've tryied to use them, but i wasn't able to... Any hint? By
now, i solved the problem saving a screenshot if the screen in an image(bmp)
and then sending it to printer... (a print preview would be cool...)
tnx


Maybe the recipes on the wxPython wiki page would
help:
http://wiki.wxpython.org/index.cgi/RecipesOther

There are at least two dealing with "Printing".
Jul 18 '05 #2
Yeah,
There are two about printing... there is also an example in the wxDemo...
but they all talk about printing text... In my case i need to print (or at
least to make a print preview) a bitmap (or a panel...)
"Peter Hansen" <pe***@engcorp.com> ha scritto nel messaggio
news:FK********************@powergate.ca...
Fabio Pliger wrote:
Hi!
I'm using wxPython to handle my application gui.. So, I have a notebook
widget and i have to print the object inside it's tab ... Maybe doing a
preview before printing... I know that wx has many objects to handle
printing.. i've tryied to use them, but i wasn't able to... Any hint? By
now, i solved the problem saving a screenshot if the screen in an image(bmp) and then sending it to printer... (a print preview would be cool...)
tnx


Maybe the recipes on the wxPython wiki page would
help:
http://wiki.wxpython.org/index.cgi/RecipesOther

There are at least two dealing with "Printing".

Jul 18 '05 #3
Fabio Pliger wrote:
Yeah,
There are two about printing... there is also an example in the wxDemo...
but they all talk about printing text... In my case i need to print (or at
least to make a print preview) a bitmap (or a panel...)


The technique used should be the same. Basically
you need to be doing draws directly to a Device Context
(or whatever DC stands for...temporary memory lapse)
and then you can draw to the screen or to a printer,
as required.

I don't know offhand what routine is used to draw
a Bitmap into a DC, but I'm sure it's reasonably
well documented under the various DC methods.

-Peter
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Fuzzyman | last post by:
I looked through the manual, I looked on the web and could find very little on this subject.... The closest I could find was : http://www.faqts.com/knowledge_base/view.phtml/aid/4549. Saying...
0
by: Russell Lear | last post by:
Hi, I'm trying to print images (tiff mainly, but images in general) from my wxPython-based application without a lot of success. The demo shows how to use the print dialog to get everything set...
6
by: Roger Binns | last post by:
My program has a random smattering of print statements scattered throughout that are mainly a debugging aid. They are typically things like this: print "entering key mode" The code is...
2
by: Darcy Kahle | last post by:
I am trying to do some advanced printing in python using the win32ui module, and have run into an issue. I need to print a page landscape. As I could not determine how to specify the orientation...
1
by: uri bushey | last post by:
So I have a tkinter based little program in Python that has a canvas loaded with a WaveSurfer (http://www.speech.kth.se/wavesurfer/) widget. I am trying to print the contents of the WaveSurfer...
8
by: David Isaac | last post by:
"Alan Isaac" <aisaac0@verizon.net> wrote in message news:_A34e.2207$1r6.248@trnddc02... > I'd like to try personal financial management using Python. > I just found PyCheckbook, but it does not...
19
by: dcrespo | last post by:
Hi all... Is there a way to print a PDF file directly from Python without having Acrobat installed? I know about ReportLab. It's a python module that lets you create almost any PDF document, but I...
10
by: Mario | last post by:
Hello all, I'm trying hard to make possible to print some simple text from python to the default printer using wxPython, after days of internet searches I found this page:...
3
by: Max | last post by:
How can I print (as in laser printer, not the python print statement) HTML from Python (actually it doesn't have to be HTML - it's tabular data with some rows/columns highlited). The project...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.