在PictureBox中显示pdf文件的第一页(在c#中) [英] show first page of a pdf file in a PictureBox (in c#)

查看:337
本文介绍了在PictureBox中显示pdf文件的第一页(在c#中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PictureBox中显示pdf文件的第一页(在c#中)







如果我选择一个图片文件,如bmp,gif,jpg或...,它是可以在PictureBox中显示

,但如果文件是另一种格式,如pdf,word,excel ,和...

我该怎么做?



非常感谢

show first page of a pdf file in a PictureBox (in c#)

Hi

if i select a picture file such as bmp, gif, jpg or ..., it is posible to show it in a PictureBox
but if the file is in another format such as pdf, word, excel , and ...
How can I do this?

Thanks very much

推荐答案

由于PDF不是图像文件,因此PictureBox不知道PDF是什么或如何呈现它。



你必须转换PDF的第一页首先显示图像,然后才能显示它。 COnsult 这些 [ ^ ]文章。
Since a PDF is NOT an image file, the PictureBox has no idea what a PDF is or how to render it.

You have to convert the first page of the PDF to an image first before you can display it. COnsult these[^] articles.


这篇关于在PictureBox中显示pdf文件的第一页(在c#中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆