storing a scanned (pdf,tiff,jpeg) file in MongoDB .

你离开我真会死。 提交于 2020-02-21 04:54:48

问题


I have to store a tiff(tag image file format) or pdf scanned file in mongodb that should be Text search able . like if we want to search "on base of text" it should be able to search .

I am going to use .net mvc or java with mongodb .

so how can i store this pdf file and then can retrieve from database .

any suggestion will be appreciated .

thanks


回答1:


You can store files by using MongoDb GridFs as described in this question and extract texts from a PDF file by using some features those described in this question. ;).

HTH




回答2:


I think that you should save the files on file system of the server and the path of the file and the string from the file inside of MongoDB, It's more efficient to read the file from the servers filesystem then to load them from MongoDB.

The other option is to save the file as binary data but then you won't be able to search inside the file.



来源:https://stackoverflow.com/questions/41084036/storing-a-scanned-pdf-tiff-jpeg-file-in-mongodb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!