473,493 Members | 4,355 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Anyone using wx.lib.printout?

true911m
92 New Member
I managed to give myself the capability to print to paper with just a couple function calls, but my efforts have stalled there.

I would like to, minimally, be able to change a few page elements such as the typeface and margins, but it appears the properties and methods are buried much deeper than the examples I have encountered so far.

All documentatiion I have uncovered is for the C wxPrintout module, and is minimal at best.

If anyone has documentation/instructions, or some example code that does something of this nature, it would be most helpful.

Thanks.
Dec 7 '06 #1
24 2928
bartonc
6,596 Recognized Expert Expert
Windows or Linux?
Dec 7 '06 #2
true911m
92 New Member
Sorry, I thought it was obvious, but I was thinking of the win32 stuff instead. This is for windows.
Dec 7 '06 #3
bartonc
6,596 Recognized Expert Expert
I managed to give myself the capability to print to paper with just a couple function calls, but my efforts have stalled there.

I would like to, minimally, be able to change a few page elements such as the typeface and margins, but it appears the properties and methods are buried much deeper than the examples I have encountered so far.

All documentatiion I have uncovered is for the C wxPrintout module, and is minimal at best.

If anyone has documentation/instructions, or some example code that does something of this nature, it would be most helpful.

Thanks.
The font is handled by the document (check out document/view overview in the C wx docs). Margins are set in a setup dialog. I'm sure that we can figure out how to get that open for you.
Dec 7 '06 #4
bartonc
6,596 Recognized Expert Expert
The font is handled by the document (check out document/view overview in the C wx docs). Margins are set in a setup dialog. I'm sure that we can figure out how to get that open for you.
I'm not sure if this will work. I'm trying to attach "PrintFramwork.txt" which I copied from the demos in case you don't have that yet. Get it here
Dec 8 '06 #5
bartonc
6,596 Recognized Expert Expert
I'm not sure if this will work. I'm trying to attach "PrintFramwork.txt" which I copied from the demos in case you don't have that yet. Get it here
It worked!
Dec 8 '06 #6
true911m
92 New Member
It worked!
I'm getting an "invalid attachment message" from that link...
Dec 8 '06 #7
bartonc
6,596 Recognized Expert Expert
I'm getting an "invalid attachment message" from that link...
Drat! Now I do, too (now, it worked last night). Do you have demos and docs? Download it at wxPython site if not.
Dec 8 '06 #8
true911m
92 New Member
By demos, are you referring to the wxPython package? I'm not finding it.
Dec 8 '06 #9
bartonc
6,596 Recognized Expert Expert
By demos, are you referring to the wxPython package? I'm not finding it.
Nope, there's a second msi called something like "demos and docs".
Dec 8 '06 #10
bartonc
6,596 Recognized Expert Expert
Nope, there's a second msi called something like "demos and docs".
BTW, I checker out the "print framework". It is beautiful.
Dec 8 '06 #11
true911m
92 New Member
I have the wxPython demos, and I've been through them a few times. There's very little out there re using printout. I did incorporate what I found, though it breaks my program control by forcing app.loop() back to pySimpleApp or something similar.

What's this file you're trying to get me?
Dec 8 '06 #12
true911m
92 New Member
I found the PrintFramework in the Miscellaneous section. I also found a copy of WxPython Iin Action, which has a section on it.
Dec 8 '06 #13
bartonc
6,596 Recognized Expert Expert
I found the PrintFramework in the Miscellaneous section. I also found a copy of WxPython Iin Action, which has a section on it.
The book is essential for getting started. It also help support the work being done on wxPython. The print framework is covered.
Dec 8 '06 #14
true911m
92 New Member
The book is essential for getting started. It also help support the work being done on wxPython. The print framework is covered.
Yeah, this is the first comprehensive walkthrough I've seen on ANY of this stuff.
I'm walking through the printout chapter now. Let's see what I get out of it. It's nice to have a few diagrams.

The reason I picked up wxPython in the first place was for printing capability. I got reportlab working, but the call to Adobe Reader is still a little schitzy under some circumstances, even though it maintains cross-platform compatibility.

If you're looking to pick up the language from a general-purpose perspective, you really need to be able to print. :)
Dec 8 '06 #15
true911m
92 New Member
I got your atachment. I found this in the demos, and it ran there.

However, the first thing I did after that was to copy it to Komodo to play with. When I moved it and ran it, it said it couldn't find the ScrolledWindow module. When I looked for it in the libs, I couldn't either, so I don't know where it's pulling that from.

So now, I'm typing in code examples from the book...
Dec 9 '06 #16
bartonc
6,596 Recognized Expert Expert
I got your atachment. I found this in the demos, and it ran there.

However, the first thing I did after that was to copy it to Komodo to play with. When I moved it and ran it, it said it couldn't find the ScrolledWindow module. When I looked for it in the libs, I couldn't either, so I don't know where it's pulling that from.

So now, I'm typing in code examples from the book...
Get the examples on line here.
Dec 9 '06 #17
true911m
92 New Member
Get the examples on line here.
Ah, good link!

I think I'm stretching a bit far (and getting a headache) with these modules at this point. I found a couple of nice libraries for reading and writing Excel, so I think I'll use Excel for my columnar output, and reportlab for text.

I plan to start with the wxPython book from the beginning, to get more of a feel for building that way, which is more VB/event-driven. All the learning stuff is more top-to-bottom.

I keep hearing good stuff about Boa, even though it's release # would indicate it's not so mature. I loaded it, but its use is not intuitive to me. Any recommendations on stuff in print for that, while learning wxPython?

Cheers.
Dec 10 '06 #18
bartonc
6,596 Recognized Expert Expert
Ah, good link!

I think I'm stretching a bit far (and getting a headache) with these modules at this point. I found a couple of nice libraries for reading and writing Excel, so I think I'll use Excel for my columnar output, and reportlab for text.

I plan to start with the wxPython book from the beginning, to get more of a feel for building that way, which is more VB/event-driven. All the learning stuff is more top-to-bottom.

I keep hearing good stuff about Boa, even though it's release # would indicate it's not so mature. I loaded it, but its use is not intuitive to me. Any recommendations on stuff in print for that, while learning wxPython?

Cheers.
Yeah, I guess that it makes sense to go with what you know (using win23 from PythonWin to talk to excel, right?). Especially if you are under the gun time-wise.
Boa is being worked on actively, but the binaries for download are stale. Current modules are downloaded via CVS (a hole other discussion - covered at sourceforge boa/help if you are curious). The help files incluce "Getting Start Guide to Boa Constructor" which is what I used to get it figured out. True documentation is also in the works. Good luck, have fun, and most of all - keep posting.
Dec 10 '06 #19
true911m
92 New Member
Yeah, I guess that it makes sense to go with what you know (using win23 from PythonWin to talk to excel, right?). Especially if you are under the gun time-wise.
Boa is being worked on actively, but the binaries for download are stale. Current modules are downloaded via CVS (a hole other discussion - covered at sourceforge boa/help if you are curious). The help files incluce "Getting Start Guide to Boa Constructor" which is what I used to get it figured out. True documentation is also in the works. Good luck, have fun, and most of all - keep posting.
Haven't found win23 yet, though I have PythonWin - was working with pyExcelerator on a simple personal app. Ran into some limitations/nonfunctioning elements today though, that soured me a little.

I'm trying so many new (to me) libraries that my head is spinning.
Dec 11 '06 #20
true911m
92 New Member
Yeah, I guess that it makes sense to go with what you know (using win23 from PythonWin to talk to excel, right?). Especially if you are under the gun time-wise.
Boa is being worked on actively, but the binaries for download are stale. Current modules are downloaded via CVS (a hole other discussion - covered at sourceforge boa/help if you are curious). The help files incluce "Getting Start Guide to Boa Constructor" which is what I used to get it figured out. True documentation is also in the works. Good luck, have fun, and most of all - keep posting.
What's the CVS?
Dec 11 '06 #21
true911m
92 New Member
What's the CVS?
Skip that. Found the CVS on SourceForge, but it's full of .htb files (?) and circular references to the guide under the CVS -- the only links I find keep bringing me back to that note, not to the guide itself.
Dec 11 '06 #22
true911m
92 New Member
Skip that. Found the CVS on SourceForge, but it's full of .htb files (?) and circular references to the guide under the CVS -- the only links I find keep bringing me back to that note, not to the guide itself.
OK, I'm yapping now... Rather than dig into one or the other of these libs, and I'm sure boa is one good one... is there an IDE for the GUI stuff (tkinter, wxPython, whatever) that has that Visual Studio type of integration?

The key feature(s) being, all the properties for objects are shown there if I need them, but usually you can create an app with just two or three properties and methods. I don't know what those are off the top of my head, but I can find what I need when I need it if it's there in a context-sensitive list of items.

I worked through a whole book on RealBasic recently. The IDE is a snap and gives VB a run for its money. It does things a little differently, because it professes to be OO (really pseudo; strings and raw data are not), and it's cross-platform.

I became tired only of the same problems I'm having here, such as not being able to print universally, since it's cross-platform. It was very nice to work in, though.

Is anything in the GUI Python world up to this standard yet?
Dec 11 '06 #23
bartonc
6,596 Recognized Expert Expert
OK, I'm yapping now... Rather than dig into one or the other of these libs, and I'm sure boa is one good one... is there an IDE for the GUI stuff (tkinter, wxPython, whatever) that has that Visual Studio type of integration?

The key feature(s) being, all the properties for objects are shown there if I need them, but usually you can create an app with just two or three properties and methods. I don't know what those are off the top of my head, but I can find what I need when I need it if it's there in a context-sensitive list of items.

I worked through a whole book on RealBasic recently. The IDE is a snap and gives VB a run for its money. It does things a little differently, because it professes to be OO (really pseudo; strings and raw data are not), and it's cross-platform.

I became tired only of the same problems I'm having here, such as not being able to print universally, since it's cross-platform. It was very nice to work in, though.

Is anything in the GUI Python world up to this standard yet?
Boa fulfills there needs. Make an app with a couple of clicks. Properties that you WANT to change in a list. CVS needs an FTP like getter on your system. I use tortoiseCVS to upload the latest parts of the package.

I did find one link and am looking for a page that I found months ago that compares all the various tools available.This looks interesting.
Dec 11 '06 #24
bartonc
6,596 Recognized Expert Expert
I managed to give myself the capability to print to paper with just a couple function calls, but my efforts have stalled there.

I would like to, minimally, be able to change a few page elements such as the typeface and margins, but it appears the properties and methods are buried much deeper than the examples I have encountered so far.

All documentatiion I have uncovered is for the C wxPrintout module, and is minimal at best.

If anyone has documentation/instructions, or some example code that does something of this nature, it would be most helpful.

Thanks.
I'm actually having much success with wx.Printout. I haven't looked at what .lib has to offer yet.
Oct 11 '07 #25

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1845
by: Klefevre | last post by:
Hi, I was wondering why the code below does not work in ASP. Why does the printout method not work? Tx, Kurt Dim m_strPrinterDeviceName Dim m_objExcelApplication, m_objExcelWorkBook,...
0
2798
by: ivan | last post by:
Access97 While in ADD mode- I have a command button that has the following: DoCmd.Printout acSelection This command gives me an error message (after it prints), that there is not enough...
1
5804
by: P | last post by:
Hi, Access 2002. I am trying to use the PrintOut function to print the current record of the current open form in landscape format to the default Windows printer. Any suggestion on how to set...
0
1507
by: Owen Jenkins | last post by:
I use the DoCmd.Printout method to print reports using the client's default options This has worked fine for years with Access 97 and 2000/2, Win95-XP. However two clients have recently complained...
3
5611
by: sandro72 | last post by:
I found the classes you wrote of but it doesn't work. i tested also this code but it cretaes instances of worpad.exe that i only see by task manager and i cannot terminate them. have you any...
0
7939
by: FlightController | last post by:
Hello Everyone, Not only am I new to the forum I am entirely new to programming in VBA. I am having a problem getting some sample code working. To give you background on what I want it to do: I...
2
3186
by: MLH | last post by:
Dim HowManyCopies As Integer HowManyCopies = 4 DoCmd.OpenReport "rptSeparatorSheet", acViewPreview DoCmd.PrintOut acPrintAll, acHigh, HowManyCopies, False DoCmd.Close acReport,...
1
1896
by: selvasscript | last post by:
i want to take printout using c language . how to connect the printer using c codes..(i.e) how to connect printer using printer interface
21
4274
by: array7 | last post by:
I have been reading a lot of archived threads about "page-break- inside: avoid" not supported by IE5, IE6 IE55, IE7 and Firefox (Mozilla), which creates a really unpleasant-looking printout with...
1
4520
by: =?Utf-8?B?S2ltIFM=?= | last post by:
I have a word document I only want to printout ( not save as file ) and I use Word printout method in backgrund but my XP operativ i so slow that a "dummy" dociment also get stored. which...
0
7157
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
7192
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...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.