我正在尝试使用AbcPdf .net组件(版本7)来处理一些PDF并生成元数据。我想知道有没有什么方法可以列出pdf文档中的所有标签?作为标记的pdf的示例,我使用这个文件here。
是否有其他组件或工具可用于列出或提取pdf标签?
提前感谢您的帮助
发布于 2011-09-02 02:35:05
使用iTextSharp。它是免费的,你只需要"itextsharp.dll“。
http://sourceforge.net/projects/itextsharp/
下面是一个用于从PDF中读取文本的简单函数。
Public Shared Function GetTextFromPDF(PdfFileName As String) As String
Dim oReader As New iTextSharp.text.pdf.PdfReader(PdfFileName)
Dim sOut = ""
For i = 1 To oReader.NumberOfPages
Dim its As New iTextSharp.text.pdf.parser.SimpleTextExtractionStrategy
sOut &= iTextSharp.text.pdf.parser.PdfTextExtractor.GetTextFromPage(oReader, i, its)
Next
Return sOut
End FunctionITextSharp也有处理标签的方法。
https://stackoverflow.com/questions/3861617
复制相似问题