Printing problem

Hi all,

I use Python 2.5.2, wxPython-ansi-2.8.9.1, Mandriva 2009.0

When I preview a page in landscape mode, all is fine, but when I print, the page is in portrait mode, in the middle and I loose the right part of the informations.
The same under Windows XP works fine and I had not this problem in previous version under Linux (Ex : Python 2.4.1, wxPython-ansi-2.6.3.3, Mandriva 2006.0).

Part of code :

       prv = wx.html.HtmlPrintout(self.GTitre)
       prv.SetHeader(ent)
       prv.SetHtmlText(texte)
       prv.SetFooter(pied)
       prp = wx.html.HtmlPrintout(self.GTitre)
       prp.SetHeader(ent)
       prp.SetHtmlText(texte)
       prp.SetFooter(pied)
       prd = wx.PrintData()
       prd.SetPaperId(wx.PAPER_A4)
       if orient == 'P' :
           orient = wx.PORTRAIT
       else :
           orient = wx.LANDSCAPE
       prd.SetOrientation(orient)
       prdd = wx.PrintDialogData(prd)
       prdd.SetAllPages(True)
       preview = wx.PrintPreview(prv, prp, prdd)
       preview_win = wx.PreviewFrame(preview, None, self.GTitre, size=wx.Size(600, 700))
       preview_win.Initialize()
       if sys.platform == 'win32' :
               tmp = wx.Icon(agRecFic(os.path.join("image", 'menu.ico')),
                             wx.BITMAP_TYPE_ICO)
               preview_win.SetIcon(tmp)
               preview_win.Maximize()
       preview_win.MakeModal(False)
       wx.CallAfter(preview_win.Show)

Thanks in advance, if somebody has ideas ...

Friendly.

···

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

Hugues JEAN-BAPTISTE wrote:

Hi all,

I use Python 2.5.2, wxPython-ansi-2.8.9.1, Mandriva 2009.0

When I preview a page in landscape mode, all is fine, but when I print, the page is in portrait mode, in the middle and I loose the right part of the informations.
The same under Windows XP works fine and I had not this problem in previous version under Linux (Ex : Python 2.4.1, wxPython-ansi-2.6.3.3, Mandriva 2006.0).

Part of code :

Please provide a small runnable sample that shows the problem.

···

--
Robin Dunn
Software Craftsman

Hello,

···

On Thu, Jul 2, 2009 at 11:24 AM, Robin Dunn<robin@alldunn.com> wrote:

Hugues JEAN-BAPTISTE wrote:

Hi all,

I use Python 2.5.2, wxPython-ansi-2.8.9.1, Mandriva 2009.0

When I preview a page in landscape mode, all is fine, but when I print,
the page is in portrait mode, in the middle and I loose the right part
of the informations.
The same under Windows XP works fine and I had not this problem in
previous version under Linux (Ex : Python 2.4.1, wxPython-ansi-2.6.3.3,
Mandriva 2006.0).

Part of code :

Please provide a small runnable sample that shows the problem.

May be related, the print setup dialog does not save the orientation
selection into the printdata.

http://trac.wxwidgets.org/ticket/4335

Appears to be fixed for 2.9.

Cody

Cody Precord a écrit :

Hello,

Hugues JEAN-BAPTISTE wrote:
    

Hi all,

I use Python 2.5.2, wxPython-ansi-2.8.9.1, Mandriva 2009.0

When I preview a page in landscape mode, all is fine, but when I print,
the page is in portrait mode, in the middle and I loose the right part
of the informations.
The same under Windows XP works fine and I had not this problem in
previous version under Linux (Ex : Python 2.4.1, wxPython-ansi-2.6.3.3,
Mandriva 2006.0).

Part of code :

Please provide a small runnable sample that shows the problem.
    
May be related, the print setup dialog does not save the orientation
selection into the printdata.

wxTrac has been migrated to GitHub Issues - wxWidgets

Appears to be fixed for 2.9.

Cody

Yes, it seems, it's my problem.
I will wait patiently this new version.

Thanks a new time

Cheers.

···

On Thu, Jul 2, 2009 at 11:24 AM, Robin Dunn<robin@alldunn.com> wrote:

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)