Anyone using wx.lib.printout?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • true911m
    New Member
    • Dec 2006
    • 92

    Anyone using wx.lib.printout?

    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.
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Windows or Linux?

    Comment

    • true911m
      New Member
      • Dec 2006
      • 92

      #3
      Sorry, I thought it was obvious, but I was thinking of the win32 stuff instead. This is for windows.

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by true911m
        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.

        Comment

        • bartonc
          Recognized Expert Expert
          • Sep 2006
          • 6478

          #5
          Originally posted by bartonc
          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

          Comment

          • bartonc
            Recognized Expert Expert
            • Sep 2006
            • 6478

            #6
            Originally posted by bartonc
            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!

            Comment

            • true911m
              New Member
              • Dec 2006
              • 92

              #7
              Originally posted by bartonc
              It worked!
              I'm getting an "invalid attachment message" from that link...

              Comment

              • bartonc
                Recognized Expert Expert
                • Sep 2006
                • 6478

                #8
                Originally posted by true911m
                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.

                Comment

                • true911m
                  New Member
                  • Dec 2006
                  • 92

                  #9
                  By demos, are you referring to the wxPython package? I'm not finding it.

                  Comment

                  • bartonc
                    Recognized Expert Expert
                    • Sep 2006
                    • 6478

                    #10
                    Originally posted by true911m
                    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".

                    Comment

                    • bartonc
                      Recognized Expert Expert
                      • Sep 2006
                      • 6478

                      #11
                      Originally posted by bartonc
                      Nope, there's a second msi called something like "demos and docs".
                      BTW, I checker out the "print framework". It is beautiful.

                      Comment

                      • true911m
                        New Member
                        • Dec 2006
                        • 92

                        #12
                        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?

                        Comment

                        • true911m
                          New Member
                          • Dec 2006
                          • 92

                          #13
                          I found the PrintFramework in the Miscellaneous section. I also found a copy of WxPython Iin Action, which has a section on it.

                          Comment

                          • bartonc
                            Recognized Expert Expert
                            • Sep 2006
                            • 6478

                            #14
                            Originally posted by true911m
                            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.

                            Comment

                            • true911m
                              New Member
                              • Dec 2006
                              • 92

                              #15
                              Originally posted by bartonc
                              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. :)

                              Comment

                              Working...