Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 815
keithb Avatar asked Nov 14 '22 07:11

keithb


1 Answers

You should be able to do this by making your FlowDocument display the first page as you want it to appear in the thumbnail, then pointing a RenderTargetBitmap to the FlowDocument and saving the bitmap to disk. There is some code to do this in this article:

http://www.west-wind.com/weblog/posts/150676.aspx

like image 52
Roland Acton Avatar answered Jan 02 '23 00:01

Roland Acton