/// <summary> /// Creates a same RadFixedDocument using details text from uploaded content /// </summary> /// <param name="value">the content to use</param> /// <returns>FixedDocument that can be exported asa PDF file</returns> private static RadFixedDocument GenerateSampleDocument(MyPdfContent value) { double defaultLeftIndent = 50; double defaultLineHeight = 16; var document = new RadFixedDocument(); var page = document.Pages.AddPage(); page.Size = PageSize; var editor = new FixedContentEditor(page); editor.Position.Translate(defaultLeftIndent, 50); double currentTopOffset = 110; editor.Position.Translate(defaultLeftIndent, currentTopOffset); double maxWidth = page.Size.Width - defaultLeftIndent * 2; DocumentHelpers.DrawDescription(editor, maxWidth); currentTopOffset += defaultLineHeight * 4; editor.Position.Translate(defaultLeftIndent, currentTopOffset); using (editor.SaveProperties()) { DocumentHelpers.DrawFunnelFigure(editor); } // use the uploaded text DocumentHelpers.DrawText(editor, maxWidth, value); return(document); }