将上传文件转换为txt [英] Convert Uploading file into txt

查看:143
本文介绍了将上传文件转换为txt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

他对所有人,
我具有文件上传控件,用户可以上传任何文件,例如PDF,Word文档或PPT.当用户单击上载按钮时,我需要将上载的文档转换为.txt文件,并获取txt文件中存在的单词数以及.txt文件中存在的段落

He to all,
I have file upload control,The user might upload any of the file such as PDF,Word Document or PPT . When the user click upload button then I need to convert the uploaded document into .txt file and get number of words existed in txt file and paragraphs exited in .txt file

推荐答案

您需要在服务器上安装并访问组件才能读取这些文件. ITextSharp可以用于PDF文件,但对于Word文件,您将需要MS Word,除非它们具有所有2007年或更高版本(docx扩展名),在这种情况下,您可以使用任何OpenXML阅读器.
You would need to have components installed and accessible on the server to read those files. ITextSharp could used for the PDF files but you would need MS Word for the Word files, unless they where all 2007, or higher, versions (docx extension), in which case you could use any OpenXML reader.


这篇关于将上传文件转换为txt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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