From: Julian Smart on
Hi,

If you can reproduce the same problem with samples/printing and
samples/html/printing, then it's a wxWidgets bug rather than
wxRTC-specific. If you manage to dig around/step through the code and
find anything out I'd be grateful as I probably won't be able to look at
it before 2.8.0.

Regards,

Julian

ashishiworx(a)gmail.com wrote:
> Hi,
> Thanks, that does transfer the info, but the control does not like to
> print in landscape mode. I checked the printdata structure has the
> m_paperID set to wxPAPER_LETTER_ROTATED, but the preview window, shows
> the data in portrait mode, and that is what gets printed.
>
> -ashish
>
> Julian Smart wrote:
>
>> Hi,
>>
>> I've added:
>>
>> void wxRichTextPrinting::SetPrintData(const wxPrintData& printData);
>> void wxRichTextPrinting::SetPageSetupData(const wxPageSetupData&
>> pageSetupData);
>>
>> in CVS. Does this help?
>>
>> Regards,
>>
>> Julian
>>
>> ashishiworx(a)gmail.com wrote:
>>
>>> Thanks Julian it works,
>>>
>>> I am trying to set the wxRichTextPrinting::m_printData using the
>>> wxPageSetupDialogData::SetPrintData function, but the changes do not
>>> hold.
>>>
>>> wxPageSetupDialogData::SetPrintData(const wxPrintData& printData) sets
>>> the local m_printData but the changes never get to the
>>> wxRichTextPrinting.
>>>
>>> -ashish
>>>
>>>
>>>
>>> ashishiworx(a)gmail.com wrote:
>>>
>>>
>>>> Thanks,
>>>> I will take a look at it.
>>>>
>>>> -ashish
>>>>
>>>> Julian Smart wrote:
>>>>
>>>>
>>>>> Sorry, there was a bug when there was only 1 page - should be fixed in
>>>>> CVS now (src/richtext/richtextprint.cpp).
>>>>>
>>>>> Regards,
>>>>>
>>>>> Julian
>>>>>
>>>>> ashish wrote:
>>>>>
>>>>>
>>>>>> I am trying to print from the richtextctrl. I can print from the
>>>>>> richtext sample with the default loaded data, but When I created my own
>>>>>> xml file with the control printing does not work.
>>>>>>
>>>>>> download the file:
>>>>>> http://labscribe.com/update/rich_print.xml
>>>>>>
>>>>>> open it up in the richtext sample, the print preview will show a blank
>>>>>> page.
>>>>>>
>>>>>> -ashish
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>>>>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>>>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>>>>
>>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>>
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Julian Smart on
Hi,

Try:

void MyFrame::OnPreview(wxCommandEvent& WXUNUSED(event))
{
wxPrintData data;
data.SetPaperId(wxPAPER_LETTER);
data.SetOrientation(wxLANDSCAPE);
wxGetApp().GetPrinting()->SetPrintData(data);
wxGetApp().GetPrinting()->PreviewBuffer(m_richTextCtrl->GetBuffer());
}

Regards,

Julian

ashishiworx(a)gmail.com wrote:
> Hi,
> Thanks, that does transfer the info, but the control does not like to
> print in landscape mode. I checked the printdata structure has the
> m_paperID set to wxPAPER_LETTER_ROTATED, but the preview window, shows
> the data in portrait mode, and that is what gets printed.
>
> -ashish
>
> Julian Smart wrote:
>
>> Hi,
>>
>> I've added:
>>
>> void wxRichTextPrinting::SetPrintData(const wxPrintData& printData);
>> void wxRichTextPrinting::SetPageSetupData(const wxPageSetupData&
>> pageSetupData);
>>
>> in CVS. Does this help?
>>
>> Regards,
>>
>> Julian
>>
>> ashishiworx(a)gmail.com wrote:
>>
>>> Thanks Julian it works,
>>>
>>> I am trying to set the wxRichTextPrinting::m_printData using the
>>> wxPageSetupDialogData::SetPrintData function, but the changes do not
>>> hold.
>>>
>>> wxPageSetupDialogData::SetPrintData(const wxPrintData& printData) sets
>>> the local m_printData but the changes never get to the
>>> wxRichTextPrinting.
>>>
>>> -ashish
>>>
>>>
>>>
>>> ashishiworx(a)gmail.com wrote:
>>>
>>>
>>>> Thanks,
>>>> I will take a look at it.
>>>>
>>>> -ashish
>>>>
>>>> Julian Smart wrote:
>>>>
>>>>
>>>>> Sorry, there was a bug when there was only 1 page - should be fixed in
>>>>> CVS now (src/richtext/richtextprint.cpp).
>>>>>
>>>>> Regards,
>>>>>
>>>>> Julian
>>>>>
>>>>> ashish wrote:
>>>>>
>>>>>
>>>>>> I am trying to print from the richtextctrl. I can print from the
>>>>>> richtext sample with the default loaded data, but When I created my own
>>>>>> xml file with the control printing does not work.
>>>>>>
>>>>>> download the file:
>>>>>> http://labscribe.com/update/rich_print.xml
>>>>>>
>>>>>> open it up in the richtext sample, the print preview will show a blank
>>>>>> page.
>>>>>>
>>>>>> -ashish
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>>>>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>>>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>>>>
>>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>>
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: ashishiworx on
Hi Julian,
setting the orientation manually works.

when I use
wxPageSetupDialog pageSetupDialog(this, g_pageSetupData);
pageSetupDialog.ShowModal();

wxGetApp().GetJrnlPrinting()->SetPrintData(pageSetupDialog.GetPageSetupData().GetPrintData());

the paperID gets set to:wxPAPER_LETTER_ROTATED and the
m_printOrientation is 2
The above code, does not change the orientation in print preview even
for my other non-richtext data.


whan I hardcode the printdata. using the code below,
the paperID gets set to:wxPAPER_LETTER and the m_printOrientation is 2
and the preview works.


-ashish


Julian Smart wrote:
> Hi,
>
> Try:
>
> void MyFrame::OnPreview(wxCommandEvent& WXUNUSED(event))
> {
> wxPrintData data;
> data.SetPaperId(wxPAPER_LETTER);
> data.SetOrientation(wxLANDSCAPE);
> wxGetApp().GetPrinting()->SetPrintData(data);
> wxGetApp().GetPrinting()->PreviewBuffer(m_richTextCtrl->GetBuffer());
> }
>
> Regards,
>
> Julian
>
> ashishiworx(a)gmail.com wrote:
> > Hi,
> > Thanks, that does transfer the info, but the control does not like to
> > print in landscape mode. I checked the printdata structure has the
> > m_paperID set to wxPAPER_LETTER_ROTATED, but the preview window, shows
> > the data in portrait mode, and that is what gets printed.
> >
> > -ashish
> >
> > Julian Smart wrote:
> >
> >> Hi,
> >>
> >> I've added:
> >>
> >> void wxRichTextPrinting::SetPrintData(const wxPrintData& printData);
> >> void wxRichTextPrinting::SetPageSetupData(const wxPageSetupData&
> >> pageSetupData);
> >>
> >> in CVS. Does this help?
> >>
> >> Regards,
> >>
> >> Julian
> >>
> >> ashishiworx(a)gmail.com wrote:
> >>
> >>> Thanks Julian it works,
> >>>
> >>> I am trying to set the wxRichTextPrinting::m_printData using the
> >>> wxPageSetupDialogData::SetPrintData function, but the changes do not
> >>> hold.
> >>>
> >>> wxPageSetupDialogData::SetPrintData(const wxPrintData& printData) sets
> >>> the local m_printData but the changes never get to the
> >>> wxRichTextPrinting.
> >>>
> >>> -ashish
> >>>
> >>>
> >>>
> >>> ashishiworx(a)gmail.com wrote:
> >>>
> >>>
> >>>> Thanks,
> >>>> I will take a look at it.
> >>>>
> >>>> -ashish
> >>>>
> >>>> Julian Smart wrote:
> >>>>
> >>>>
> >>>>> Sorry, there was a bug when there was only 1 page - should be fixed in
> >>>>> CVS now (src/richtext/richtextprint.cpp).
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>> Julian
> >>>>>
> >>>>> ashish wrote:
> >>>>>
> >>>>>
> >>>>>> I am trying to print from the richtextctrl. I can print from the
> >>>>>> richtext sample with the default loaded data, but When I created my own
> >>>>>> xml file with the control printing does not work.
> >>>>>>
> >>>>>> download the file:
> >>>>>> http://labscribe.com/update/rich_print.xml
> >>>>>>
> >>>>>> open it up in the richtext sample, the print preview will show a blank
> >>>>>> page.
> >>>>>>
> >>>>>> -ashish
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> >>>>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> >>>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >>>>>
> >>>>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> >>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> >> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Julian Smart on
Hi,

ashishiworx(a)gmail.com wrote:
> Hi Julian,
> setting the orientation manually works.
>
> when I use
> wxPageSetupDialog pageSetupDialog(this, g_pageSetupData);
> pageSetupDialog.ShowModal();
>
> wxGetApp().GetJrnlPrinting()->SetPrintData(pageSetupDialog.GetPageSetupData().GetPrintData());
>
> the paperID gets set to:wxPAPER_LETTER_ROTATED and the
> m_printOrientation is 2
> The above code, does not change the orientation in print preview even
> for my other non-richtext data.
>
>
> whan I hardcode the printdata. using the code below,
> the paperID gets set to:wxPAPER_LETTER and the m_printOrientation is 2
> and the preview works.
>
Curious. When I run the sample on WinXP and in Page Setup select A4 and
Landscape, the preview is landscape as expected. So I'm not sure
exactly how you're getting wxPAPER_LETTER_ROTATED. Are you saying it
gets changed from wxPAPER_LETTER + Landscape to wxPAPER_LETTER_ROTATED
when you call SetPrintData? Perhaps you could send me a version of the
sample .cpp file that demonstrates the problem, to help me reproduce it.
Also, you could try stepping through the relevant calls in your debugger
to see where it's doing the conversion.

Regards,

Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: ashishiworx on
Hi Julian,
On my computer: pentiumM Dell notebook, with winXP, and VC++ 6.0 in
the sample if I go to pagesetup and set the mode to landscape, and then
go to preview, the preview window shows the page as portrait.
I will see if I can track it down.

-ashish



Julian Smart wrote:
> Hi,
>
> ashishiworx(a)gmail.com wrote:
> > Hi Julian,
> > setting the orientation manually works.
> >
> > when I use
> > wxPageSetupDialog pageSetupDialog(this, g_pageSetupData);
> > pageSetupDialog.ShowModal();
> >
> > wxGetApp().GetJrnlPrinting()->SetPrintData(pageSetupDialog.GetPageSetupData().GetPrintData());
> >
> > the paperID gets set to:wxPAPER_LETTER_ROTATED and the
> > m_printOrientation is 2
> > The above code, does not change the orientation in print preview even
> > for my other non-richtext data.
> >
> >
> > whan I hardcode the printdata. using the code below,
> > the paperID gets set to:wxPAPER_LETTER and the m_printOrientation is 2
> > and the preview works.
> >
> Curious. When I run the sample on WinXP and in Page Setup select A4 and
> Landscape, the preview is landscape as expected. So I'm not sure
> exactly how you're getting wxPAPER_LETTER_ROTATED. Are you saying it
> gets changed from wxPAPER_LETTER + Landscape to wxPAPER_LETTER_ROTATED
> when you call SetPrintData? Perhaps you could send me a version of the
> sample .cpp file that demonstrates the problem, to help me reproduce it.
> Also, you could try stepping through the relevant calls in your debugger
> to see where it's doing the conversion.
>
> Regards,
>
> Julian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org