There is any way to set headers/footers with webconnect, or may be by writing to the Windows Registry?
TIA.
Daniel
Kirix Support Forums
Changin headers/footers
6 posts
• Page 1 of 1
Re: Changin headers/footers
I don't know in this context what you mean by headers / footers. If you just mean the HTML headings and something at the bottom of the web control it can do that fine. If not, could you please explain what you mean?
- jonmmorgan
- Registered User
- Posts: 94
- Joined: Fri May 14, 2010 9:48 am
Re: Changin headers/footers
I mean changing the printing headers/footers.
Left, Center and Right header and Left, Center and Right Footer, like Firefox has.
Left, Center and Right header and Left, Center and Right Footer, like Firefox has.
- dancb
- Registered User
- Posts: 7
- Joined: Sat Aug 27, 2011 7:17 am
Re: Changin headers/footers
Thanks, I now understand. I have noticed before that you can get some funny headers and footers, but never looked into whether you can change them. I don't believe there is any way in the current wxWebConnect, but if you are happy to change it then it looks like you can use the nsIPrintSettings properties:
The print settings can be found in m_ptrs->m_print_settings in webcontrol.cpp.
Of course, I haven't tried this so YMMV.
- Code: Select all
attribute wstring headerStrLeft;
attribute wstring headerStrCenter;
attribute wstring headerStrRight;
attribute wstring footerStrLeft;
attribute wstring footerStrCenter;
attribute wstring footerStrRight;
The print settings can be found in m_ptrs->m_print_settings in webcontrol.cpp.
Of course, I haven't tried this so YMMV.
- jonmmorgan
- Registered User
- Posts: 94
- Joined: Fri May 14, 2010 9:48 am
Re: Changin headers/footers
Thank you for the tip Jon, mi mileage is not so good, but with some effort I could implement printing headers/footers by adding some code to webcontrol.cpp.
In void wxWebControl::Print(bool silent)
I added:
if (settings19)
{
settings19->SetHeaderStrLeft(wxToUnichar(HL));
etc. etc.
In void wxWebControl::Print(bool silent)
I added:
if (settings19)
{
settings19->SetHeaderStrLeft(wxToUnichar(HL));
etc. etc.
- dancb
- Registered User
- Posts: 7
- Joined: Sat Aug 27, 2011 7:17 am
Re: Changin headers/footers
Glad to hear it. I should probably have put those methods in C++ form rather than IDL form rather than expecting you to just figure it out, but I'm glad you got it anyway.
- jonmmorgan
- Registered User
- Posts: 94
- Joined: Fri May 14, 2010 9:48 am
6 posts
· Page 1 of 1
Return to wxWebConnect Questions, Thoughts & Feedback