Hi,
I tried to put two lines in header. The first page´s header its ok when i print it, but the next pages the header changes like this:
first page´s header:
---------------------------------------------------------------------------------------
Title
date
---------------------------------------------------------------------------------------
next page´s header:
---------------------------------------------------------------------------------------
date
Title
---------------------------------------------------------------------------------------
This is the code:
Thank you, for your service.
I tried to put two lines in header. The first page´s header its ok when i print it, but the next pages the header changes like this:
first page´s header:
---------------------------------------------------------------------------------------
Title
date
---------------------------------------------------------------------------------------
next page´s header:
---------------------------------------------------------------------------------------
date
Title
---------------------------------------------------------------------------------------
This is the code:
RadDocument headerDoc =
new
RadDocument();
RadDocument footerDoc =
new
RadDocument();
Section hSection =
new
Section();
hSection.PageOrientation = PageOrientation.Landscape;
headerDoc.DefaultPageLayoutSettings =
new
PageLayoutSettings(PaperTypes.A4);
headerDoc.SectionDefaultPageOrientation = PageOrientation.Landscape;
headerDoc.Sections.Add(hSection);
headerDoc.SectionDefaultPageMargin =
new
Telerik.Windows.Documents.Layout.Padding(5, 5, 5, 5);
Paragraph hparagraph =
new
Paragraph();
hSection.Blocks.Add(hparagraph);
Span hspan =
new
Span(
"Title"
);
hspan.FontSize = 20;
if
(!
string
.IsNullOrEmpty(
"Title"
))
hparagraph.Inlines.Add(hspan);
Paragraph h2paragraph =
new
Paragraph();
h2paragraph.TextAlignment = RadTextAlignment.Right;
hSection.Blocks.Add(h2paragraph);
var fecha = DateTime.Now;
Span h2span =
new
Span(fecha.ToString());
h2span.FontSize = 10;
h2paragraph.Inlines.Add(h2span);
Section fSection =
new
Section();
fSection.PageOrientation = PageOrientation.Landscape;
footerDoc.DefaultPageLayoutSettings =
new
PageLayoutSettings(PaperTypes.A4);
footerDoc.SectionDefaultPageOrientation = PageOrientation.Landscape;
footerDoc.Sections.Add(fSection);
footerDoc.SectionDefaultPageMargin =
new
Telerik.Windows.Documents.Layout.Padding(5, 5, 5, 5);
Paragraph fparagraph =
new
Paragraph();
fSection.Blocks.Add(fparagraph);
Span fspan =
new
Span(
"Footer"
);
fspan.FontSize = 30;
if
(!
string
.IsNullOrEmpty(
"Footer"
))
fparagraph.Inlines.Add(fspan);
Header header =
new
Header();
Footer footer =
new
Footer();
header.Body = headerDoc;
footer.Body = footerDoc;
Section section =
new
Section();
section.PageOrientation = PageOrientation.Landscape;
section.Headers.Default = header;
section.Footers.Default = footer;
return
section;
Thank you, for your service.