如何获得文本从一个PDF C#中的某种颜色 [英] How to get text with a certain color from a pdf c#

查看:153
本文介绍了如何获得文本从一个PDF C#中的某种颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须把数据从一个PDF文件,在一定的数据库结构。这就要求我能够得到一定的数据输出PDF文件。由于PDF没有得到任何标签等等。我想知道是否有可能根据颜色来获得的文本。例如说,我想所有的红色文字。或者我要在文档中的所有斜体文本。这是可能在C#中?或者说还有什么其他的方式来在PDF文档中轻松地过滤数据?

I have to put the data from a pdf file in a certain database structure. This requires me to be able to get certain data out of the pdf file. Since pdf hasn't got any tags etc ... i was wondering if it is possible to get text based on a color. Say for example i want all the red text. Or i want all the italic text in the document. Is this possible in C# ? Or is there an other way to easily filter data in a pdf document ?

推荐答案

我已经采取了不同的方法。我转换的PDF到Excel文件。这是很容易的搜索彩色文本

I've taken a different approach. I converted the pdf to an excel file. And this was very easy to search for the coloured text

这篇关于如何获得文本从一个PDF C#中的某种颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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