简体   繁体   English

显示少量文档

[英]Showing a small size sight of documents

I use a file uploader and a user can upload .pdf, .jpg, .doc etc. 我使用文件上传器,用户可以上传.pdf,.jpg,.doc等。

I have a grid like below at the web page: 我在网页上有一个像下面这样的网格:

在此处输入图片说明

At that grid I show the list of documents. 在该网格上,我显示了文档列表。 And I want to show them like below: 我想像下面这样显示它们:

在此处输入图片说明

Any idea? 任何想法? How can I do it? 我该怎么做? Are there any example? 有什么例子吗? I want to show a small size sight of documents in order to faciliate understanding at the first look. 我想展示一些小型文档,以便于初步了解。 If there were only image, I could use thumbnail for it but there are docs and pdf also.. 如果只有图像,我可以使用缩略图,但是也有docs和pdf。

(And the each sights should be an image of each document) (并且每个景点应该是每个文档的图像)

If you are running your server on windows you can use the shell's thumbnails. 如果您在Windows上运行服务器,则可以使用外壳程序的缩略图。 See this . 看到这个 That way you will get thumbnails for the images and a different icon dependng on the file type. 这样,您将获得图像的缩略图以及取决于文件类型的其他图标。 Maybe you can even get it to work with PDF and DOC files, but that's a matter of fidding with the shell. 也许您甚至可以使用它来处理PDF和DOC文件,但这只是外壳的问题。 On my machine (64-bit) I don't get thumbnails but there are fixes available . 在我的机器(64位)上,我没有缩略图,但是有可用修复程序

Update: I followed the instructions at the end of this article and got thumbnails woking on my shell. 更新:我按照本文结尾处的说明进行操作,并在外壳上显示了缩略图。

In order for this to work you will need to install MS office and adobe reader on the server, or at least create fake file associations. 为了使其正常工作,您将需要在服务器上安装MS Office和Adobe Reader,或者至少创建伪造的文件关联。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM