Questions tagged [flowdocument]

Microsoft's WPF FlowDocument technology allows to render embedded, dynamically adjusted and re-flowing document content that supports columns, pagination and search.

A flow document is designed to "reflow content" depending on window size, device resolution, and other environment variables. Flow content can be complex, consisting of various elements including text, images, tables. In addition, flow documents have a number of built in features including search, viewing modes that optimize readability, and the ability to change the size and appearance of fonts.

571 questions
5
votes
2 answers

What's the recommended approach to generating a Preview Thumbnail Image of the fist page of a FlowDocument

I would like to generate a small Preview Image of the fist page of a FlowDocument (imagine a Thumbnail View of a collection of FlowDocuments). Can anyone recommend a good approach for doing this?
keithb
  • 81
  • 1
  • 5
5
votes
1 answer

WPF FlowDocument printing only to small area

I am printing plain text in WPF by using a FlowDocument, FlowDocumentPaginator and PrintDialog. My approach is based on this article and is implemented as follows: var printDialog = new PrintDialog(); if (printDialog.ShowDialog() ==…
Gigi
  • 28,163
  • 29
  • 106
  • 188
5
votes
2 answers

Single line borders in FlowDocument Tables

I have a FlowDocument table where I want to spice up the layout a bit. I'm thinking something like a thin line separating the sub amounts on an invoice from the total or something like the line under the header row typically featured in the standard…
Holstebroe
  • 4,993
  • 4
  • 29
  • 45
5
votes
2 answers

Converting docx files to WPF Flow Documents

I'm trying to convert a bunch of Microsoft Word documents, containing a few pictures and many lines of text and headings to Flow Documents. I found this article useful, but I couldn't add images form docx files to Flow Documents properly. A sample…
fardjad
  • 20,031
  • 6
  • 53
  • 68
5
votes
1 answer

Defining where on the page the flowdocument I am printing will 'start' and 'end'

I am almost done with implementing a printing functionality, but I am having trouble getting the last hurdle done with. My problem is, that I am printing some reports, consisting of a header (with information about the person the report is about), a…
Sagi1981
  • 335
  • 5
  • 13
5
votes
3 answers

Convert XAML to FlowDocument to display in RichTextBox in WPF

I have some HTML, which i am converting to XAML using the library provided by Microsoft string t = HtmlToXamlConverter.ConvertHtmlToXaml(mail.HtmlDataString,true); now, from How to insert XAML into RichTextBox? i am using the following: private…
Erika
  • 2,045
  • 7
  • 25
  • 31
5
votes
4 answers

What is the best substitute for FlowDocument in Silverlight?

I'm porting an application from WPF to Silverlight and was saddened to read of the lack of FlowDocument support. What is the best way in Silverlight then to display text with markup? I just need the basics, e.g. bold italic hyperlink colors font…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
5
votes
3 answers

Saving FlowDocument to SQL Server

I need to save WPF FlowDocuments to SQL Server. What is the best format for doing that? String? Blob? Does it matter in a document less than 5K words or so?
David Veeneman
  • 18,912
  • 32
  • 122
  • 187
5
votes
1 answer

How can I prevent wrapping in a WPF FlowDocument in C# code?

Studies have shown this is the way to prevent wrapping in, say, a Paragraph: unwrapping text How can I get the behavior in C# code? new Paragraph(new TextBlock() { Text =…
epalm
  • 4,283
  • 4
  • 43
  • 65
5
votes
1 answer

Repeating databound item in WPF FlowDocument

I have a flowdocument in WPF that looks like this:
ajma
  • 12,106
  • 12
  • 71
  • 90
5
votes
2 answers

ElementHost + FlowDocument = GC not working, memory keeps increasing

[Updated, see bottom!] There is a memory leak in our WinForms application hosting a WPF FlowDocumentReader in an ElementHost. I have recreated this issue in a simple project and added the code below. What the application does When I press…
svinja
  • 5,495
  • 5
  • 25
  • 43
5
votes
1 answer

WPF FlowDocument Scale to Fit Page

I have a FlowDocument that varies in height due to an ItemsControl in a BlockUIContainer. In some cases, the ItemsControl extends beyond the page height. Is there a way to scale the FlowDocument to fit a page (8.5" X 11") right before printing if…
Johnathan1
  • 2,241
  • 5
  • 23
  • 24
4
votes
1 answer

Why doesn't my FlowDocument use the whole width?

I am converting HTML to XAML and loading it in a StackPanel with FlowDocumentScrollViewer. The content is rendering correctly from the HTML. My issue is the content or the FlowDocument does not appear to use the whole width. The html to xaml…
Jim
  • 808
  • 2
  • 11
  • 28
4
votes
1 answer

Flowdocument pagination with BlockUIContainer

Does anyone know how to break a large BlockUIControl over several pages in a FlowDocument? Right now it is getting cut off rather than paginating it. I am using a custom DocumentPaginator DocumentPaginator dp =…
MikeC
  • 284
  • 1
  • 3
  • 14
4
votes
1 answer

saving a FlowDocument to disk as an XPS document

now the Window containing the FlowDocumentReader which contains my FlowDocument that I want to convert is loaded on the screen , it has a button there , I want when clicking on this button , to save my FLowDocument to disk as an XPS , using Package…
Musaab
  • 805
  • 2
  • 13
  • 30