Some PrintPreview questions

hello,

with the help of Ed Leafe, I just succeeded in doing Print / PrintPreview from an STC,
but now I have a few questions:

What's the use of sending 2 STCPrintout to PrintPreview ?
    po1 = STCPrintout (..)
    po2 = STCPrintout (..)
    self._printPreview = wx.PrintPreview(po1, po2, self._printData)

Why does PrintPreview has such a huge collection of (ueseless ?) view-scaling factors
(10%, 20% ...200%),
but misses the desired fit-width / fit-height / 100% scaling factors ?

thanks,
Stef Mientki

Stef Mientki wrote:

hello,

with the help of Ed Leafe, I just succeeded in doing Print / PrintPreview from an STC,
but now I have a few questions:

What's the use of sending 2 STCPrintout to PrintPreview ?
   po1 = STCPrintout (..)
   po2 = STCPrintout (..)
   self._printPreview = wx.PrintPreview(po1, po2, self._printData)

I've answered this in my other mail.

Why does PrintPreview has such a huge collection of (ueseless ?) view-scaling factors
(10%, 20% ...200%),
but misses the desired fit-width / fit-height / 100% scaling factors ?

You might be able to get an informed answer on this in the wx-users list, or you might get something like, "Because that's the way it has always been and nobody has bothered to change it yet. Patches are gladly accepted." :wink:

OTOH, there may now be enough of the print framework exposed to Python that a custom Print Preview could be done all from Python code, although it would probably take a careful reading of the C++ code to know what all needs to be done for it, and how to interact properly with the wx.Printout class... If somebody wants to tackle this and finds that something is missing from wxPython let me know and I'll try to add wrappers for it.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!