如何在不使用C#或VB中的任何DLL的情况下阅读PDF [英] How to read PDF without using any DLL in C# or VB

查看:106
本文介绍了如何在不使用C#或VB中的任何DLL的情况下阅读PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在不使用任何使用C#或VB的dll的情况下阅读pdf的内容,请建议任何解决方案



谢谢



我尝试了什么:



我必须在不使用任何dll的情况下阅读pdf的内容,请提出任何解决方案

I have to read contents of pdf without using any dll using C# or VB, please suggest any solutions

Thanks

What I have tried:

I have to read contents of pdf without using any dll, please suggest any solutions

推荐答案

除非您是的专家,否则不能这样做PDF规范 [ ^ ]。如果您知道数据如何以字节形式存储在文件中,那么您才能读取PDF文件。在这种情况下,您可以使用FileStream并读取文件中的字节并渲染输出...



如果不是这样,那就去吧获得一个免费的图书馆(那里有很多!)并使用它为您自己的利益。 iTextSharp是您可以使用的解决方案之一。它简单又整洁。



c# - 在.Net中阅读PDF文档 - Stack Overflow [ ^ ]



基于浏览器



如果您可以构建一个使用PDF文件加载浏览器的应用程序,则可以使用浏览器预览该文件。但在这种情况下,浏览器需要支持PDF格式,或者至少有一个可以预览PDF文件的扩展名。
You cannot, unless you are an expert of PDF specification[^]. If you know how the data is stored in byte form on the file, only then you can read the PDF files. In this case, you can just use FileStream and read the bytes off of the file and render the output...

If that is not the case, then go and get a free library (there are many out there!) and use it for your own benefit. iTextSharp is one of the solutions that you can use. It is easy and neat.

c# - Reading PDF documents in .Net - Stack Overflow[^]

Browser-based

If you can build an application, that loads the browser with the PDF file, there are chances that you can preview that file using the browser. But in this case, browser would require to support PDF format, or at least have an extension that can preview PDF files.


这篇关于如何在不使用C#或VB中的任何DLL的情况下阅读PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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