阅读pdf文件C# [英] Read pdf document C#

查看:66
本文介绍了阅读pdf文件C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更好的解决方案:ADVICE 

1)在sql数据库中插入pdf并读取

2)在sql中插入位置并从文件$中读取b
$ b我有很多pdf文件使用azure

Misrosoft sql server 2017

谢谢





我尝试过:



建议



我有很多pdf文件使用azure 

Misrosoft sql server 2017

解决方案

< blockquote>取决于你正在做什么,为什么。



没有更好的解决方案 - 有些会更好这些那些下,其他人会更好。没有一种解决方案适合所有情况。



将PDF直接存储到数据库中有一些优点,但也会增加带宽使用量,这可能会降低SQL速度,如以及可能使SQL数据库文件显着增大,并带来所有备份缺陷 - 但存储位​​置意味着每个想要检索数据的系统都需要访问该公共位置,并且还需要处理潜在的文件名冲突:例如,可能有数百个文档称为报告。



想想你想要实现的目标,以及如何处理文件你的系统整体 - 然后你就如何存储东西做出合理的决定。


如果你有一个网络服务器或云存储,你可以将你的pdf文件存储在那里,然后在你的SQL Server中数据库,你只能存储pdf文件的URL。

不要尝试做他使用Dropbox,不再可能以简单的方式共享URL。

如果您的文件不是太大,您可以像这样检索它们:

 using(WebClient client = new WebClient()){
string s = client.DownloadString(url);
}


Better soluton: ADVICE
 
1) Insert pdf in sql database and read 
or
2) Insert location in sql and read from file
 
I have many pdf files using azure

Misrosoft sql server 2017
 
Thanks



What I have tried:

Advice

I have many pdf files using azure

Misrosoft sql server 2017

解决方案

Depends on what you are doing with it, and why.

There is no "better solution" - some will be better under these circumstances, others will be better under those. No one solution will fit all circumstances.

Storing PDF's directly into your DB has some advantages, but also can increase bandwidth usage, and that can potentially slow SQL down, as well as perhaps making the SQL database file significantly larger with all the backup drawbacks that implies - but storing the location means that every system which wants to retrieve the data needs access to that common location, and also that you need to take care of potential filename conflicts: there could be hundreds of documents called "Report" for example.

Think about what exactly you are trying to achieve, and how the documents are to be handled in your system as a whole - then you can make rational decisions on how to store things.


If you have a webserver or cloud storage you could store your pdf files there, then in your SQL Server database you could store only the URL's to the pdf files.
Don't try to do this with Dropbox, it is no longer possible to share URL's in a simple way.
If your files are not too large you could retrieve them like this:

using(WebClient client = new WebClient()) {
   string s = client.DownloadString(url);
}


这篇关于阅读pdf文件C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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