wx.Printout.SetLogicalOrigin()

I am having trouble with the wx.Printout (wx.PrinterDC ? ). I am trying to set the origin for multiple page printouts but only the first page seems to use the correct origin.

I can fix it by doing the following:

if page == 1:
     #Works for wxMemoryDC for all pages
     #Works for wxPrinterDC only for first page
     self.SetLogicalOrigin(50, 50)
     #Works for wxMemoryDC for all pages
     #Works for wxPrinterDC only for first page
     #dc.SetDeviceOrigin(50, 50)
if page > 1:
     if self.IsPreview():
         ##only works for the wxMemoryDC
         self.SetLogicalOrigin(50, 50)
     else:
         ##works for every page for wxPrinterDC
         self.SetLogicalOrigin(1,1)
         self.OffsetLogicalOrigin(-1,-1)

Is there something wrong with my setup? I checked the changelogs between 2.8.12 and 2.9.4 and didn't see anything.

python 2.7.1
wxPython 2.8.12.1

testPrintFrameWork.py (4.81 KB)

···

--
Ben

Sorry, that doesn't ring any bells for me. Perhaps somebody in the wx-users group will know that is going on. Be sure to mention what platform you are using.

···

On 10/23/12 12:21 PM, Benjamin Jessup wrote:

I am having trouble with the wx.Printout (wx.PrinterDC ? ). I am trying
to set the origin for multiple page printouts but only the first page
seems to use the correct origin.

I can fix it by doing the following:

if page == 1:
     #Works for wxMemoryDC for all pages
     #Works for wxPrinterDC only for first page
     self.SetLogicalOrigin(50, 50)
     #Works for wxMemoryDC for all pages
     #Works for wxPrinterDC only for first page
     #dc.SetDeviceOrigin(50, 50)
if page > 1:
     if self.IsPreview():
         ##only works for the wxMemoryDC
         self.SetLogicalOrigin(50, 50)
     else:
         ##works for every page for wxPrinterDC
         self.SetLogicalOrigin(1,1)
         self.OffsetLogicalOrigin(-1,-1)

Is there something wrong with my setup? I checked the changelogs between
2.8.12 and 2.9.4 and didn't see anything.

--
Robin Dunn
Software Craftsman