Hi,
Thanks for help. This sample is helpful.
I try to adjust the header/footer width according to the page setting (Landscape or portriat, and the Left/right margins). I mean whenever you change page settings, the header/footer width should automattically be set to page size. I cannot find this Auto-Size feature. So I want to use code to do that.
Please see my attached sample Printing_2003.sln. in SetHeaderFooterPageBorder(), I use this line to set header/footer width, but it does not work.
//????? This line does not work to adjust the header with fitting the page width
diagram.Model.HeaderFooterData.Header.Bounds.Width=(diagram.View.PageSettings.Landscape)?
diagram.View.PageSettings.Bounds.Height:diagram.View.PageSettings.Bounds.Width;
You can use 'Page Setup' menu to change 'Portriat' to 'Landscape' and the Left/right margins, then Print Preview to see the Header/Footer.
Lan
Printing1.zip