Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 280
fardjad Avatar asked Jul 27 '10 08:07

fardjad


2 Answers

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.

like image 85
Todd Main Avatar answered Sep 25 '22 14:09

Todd Main


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.

like image 36
Mario Z Avatar answered Sep 25 '22 14:09

Mario Z