Hello,
I am trying to set up a letterpaper in the RadRichTextbox, however I am not having much success (see code).
RadDocument document = new RadDocument();
Header header = new Header() { Body = document, IsLinkedToPrevious = false };
var section = new Telerik.Windows.Documents.Model.Section();
section.HasDifferentFirstPageHeaderFooter = true;
section.PageSize = PaperTypeConverter.ToSize(PaperTypes.A4);
document.Sections.Add(section);
var paragraph = new Telerik.Windows.Documents.Model.Paragraph();
ImageInline image = new ImageInline(stream);
FloatingImageBlock imageBlock = new FloatingImageBlock();
imageBlock.ImageInline = image;
imageBlock.WrappingStyle = WrappingStyle.BehindText;
paragraph.Inlines.Add(imageBlock);
document.Sections.First().Children.Add(paragraph);
this.TextEditor.UpdateHeader(document.Sections.First(), HeaderFooterType.Default, header);
I am seeing the image in the header with this code, however not filling in the whole page. If I then click in the header and press Enter on the keyboard the full page length image is displayed. With pressing Enter a second time the image dissappears again. In addition I am unsure how I can place a differing image for the follow up pages.
My goal is to acheive the following points in order to be able to use this letterpaper:
- Image fills the page (imagesize = pagesize)
- Image on first page is differing to the other pages
- Margins of the first page are differing to the other pages
Sincerly
A.Kasar