fardjad
fardjad

Reputation: 20394

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 code or some guidance would be appreciated.

Upvotes: 5

Views: 9248

Answers (2)

Mario Z
Mario Z

Reputation: 4381

Also you can check out this article: Show Word file in WPF

This is also not a complete solution, but I believe it can be easily enhanced, the article has a really nice explanation of DOCX file elements and their corresponding FlowDocument elements.

Upvotes: 1

Todd Main
Todd Main

Reputation: 29153

This is one of the more popular converters: Word to XAML Converter. It ain't perfect, but it's a great start. There's also a good article on this subject at OpenXML + FlowDocument = OpenFlowDocument? which is for WPF. Finally, you can check out TextGlow - although it's for Silverlight and not using FlowDocument, it's good to see how he does some of the conversions with Linq.

Upvotes: 4

Related Questions