PDF从XML元数据中搜索 [英] PDF Search from XML metadata

查看:67
本文介绍了PDF从XML元数据中搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个搜索应用程序或网页,我可以在其中搜索包含pdf文件的相应元数据的许多xml文件。这些xml文件都遵循相同的格式,因为它们具有相同的标签等。所以理想情况下我希望能够基于这些字段进行搜索。



一旦搜索完成,我就希望能够点击每个结果并显示相应的pdf



我之前没有真正尝试过这样的事情,我正在寻找关于如何实现这一目标的一些指导。

I'm trying to create a search application or web page where I am able to search through many xml files that contain corresponding meta data for pdf files. These xml files all follow the same format in that they have the same tags etc. So ideally I want to be able to search based on these fields.

Once a search is completed I then want to be able to click on each result and it bring up the pdf that corresponds

I haven't really attempted anything like this before and am looking for some guidance on how I can go about achieving this.

推荐答案

来自你要提供的小信息我会猜测如何继续。



1.创建一个包含你想要显示给用户的数据的数据结构。

例如,文件名,大小,标题,作者,日期或任何你想要的东西。

这可以作为类,结构或数据集 [ ^ ]。



2a。加载目录中的所有文件,让用户使用上面结构中定义的成员搜索数据。

使用更多RAM,但不需要在搜索过程中打开文件。 />


2b。让用户定义关键字,解析文件并添加符合搜索条件的文件。

需要在搜索过程中打开和分析文件。

查看< a href =https://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument(v=vs.110).aspx> XDocument [ ^ ]



3.在 DataGridView [ ^ ], ListView [ ^ ] o r什么是最好的。



4.实现单击单元格或整行时打开文件的功能。

查看< a href =http://www.codeproject.com/Questions/644053/How-to-Display-a-pdf-File-in-a-sharp-application>如何在C#应用程序中显示pdf文件 [ ^ ]



我希望此信息能帮助您入门。
From the the little info you are giving I will make a guesstimate for how to proceed.

1. Create a data structure that contains the data you want to show to the user.
For example, file name, size, title, author, date or whatever you desire.
This can be done either as a class, struct or as a DataSet[^].

2a. Load all files in the directory and let the user search the data using the members defined in the structure above.
Uses more RAM, but doesn't require the file to be opened during the search.

2b. Let the user define the keywords, parse the files and add those who match the search criteria.
Requires the file to be opened and analyzed during the search.
Look into XDocument[^]

3. Show the found PDF files in a DataGridView[^], ListView[^] or whatever is preferable.

4. Implement functionality to open a file when a cell or a whole row is clicked.
Look into How to Display a pdf File in a C# application[^]

I hope this info will get you started.


这篇关于PDF从XML元数据中搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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