What is the recommended approach for creating a thumbnail preview image of the first page of a FlowDocument?

I would like to create a small preview of the first page of the FlowDocument (imagine the Thumbnail View of the FlowDocuments collection). Can anyone recommend a good approach for this?

+5
source share
2 answers

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

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

+1

Image magick DLL . : http://www.imagemagick.org/script/index.php -, : 100 * 100 .

1) . 2) DLL 3) DLL (DLL, \ImageMagick)
#
/ **********************************************/

ImageMagickObject.MagickImage imgLarge = new ImageMagickObject.MagickImage();
string resizedPara = "100x100"; 
object[] objResize = new object[] { <your saved original image path>, "-resize", size, "-gravity", "center", "-colorspace", "RGB", "-extent", resizedPara , <OutPut Resized Image path> }; 
imgLarge.Convert(ref objResize);


/ **********************************************/
... ...

abhishek

0

All Articles