Zorthmaster / pynsource

Automatically exported from code.google.com/p/pynsource
0 stars 0 forks source link

Printing under Mac OsX spools multiple pages #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create a diagram
2.Print

What is the expected output? What do you see instead?

Instead of printing one page, hundreds of pages are spooled very quickly.

Original issue reported on code.google.com by abu...@gmail.com on 5 Nov 2012 at 10:34

GoogleCodeExporter commented 9 years ago
Reported by user:

Downloaded pyNsourceGui for Mac OSX-- really like it. I imported some existing 
python code and your app successfully generated an accurate UML diagram.  I 
wanted to print one of the digrams to a PDF file, but when I selected 'print' 
the app started spooling a ton of pages. I canceled when it reached 398 pages. 
Is there a way to print the UML diagram?

Original comment by abu...@gmail.com on 5 Nov 2012 at 10:34

GoogleCodeExporter commented 9 years ago
Print module is pretty off the shelf stuff.  I wonder if the wxPython demos 
print ok under mac? 

Original comment by abu...@gmail.com on 5 Nov 2012 at 10:38

GoogleCodeExporter commented 9 years ago
Current Workaround: You might just have to do a screenshot for now and print 
from there. 

Original comment by abu...@gmail.com on 5 Nov 2012 at 10:38

GoogleCodeExporter commented 9 years ago
Aha - it seems that the print dialog is pre-populated with 9999 as the pages 
'to' range.  If you correct that in the gui print dialog back to 1 again, you 
are good to go.

Now I just have to figure out how to do this in code, or prevent it from 
happening in the first place.

Original comment by abu...@gmail.com on 14 Jan 2014 at 7:48

Attachments:

GoogleCodeExporter commented 9 years ago
See http://wxpython.org/Phoenix/docs/html/printing_framework_overview.html for 
some nice doco.

/Users/andy/Devel/pynsource/src/pyNsourceGui.py
calls
/Users/andy/Devel/pynsource/src/common/printframework.py
where I define my own
class MyPrintout(wx.Printout):

The calls are

 printout = MyPrintout(self.canvas, self.log)
 printout2 = MyPrintout(self.canvas, self.log)
 self.preview = wx.PrintPreview(printout, printout2, self.printData)

why am I creating 2 printout objects?

Original comment by abu...@gmail.com on 14 Jan 2014 at 8:05

GoogleCodeExporter commented 9 years ago
Seems to happen in the official wxPython demo.
So I posted
https://groups.google.com/forum/#!topic/wxpython-mac/czNH5Pu7Xlc

Original comment by abu...@gmail.com on 16 Jan 2014 at 7:22