【问题标题】:listing all the tags in a pdf document using abcpdf使用 abcpdf 列出 pdf 文档中的所有标签
【发布时间】:2011-04-21 04:04:15
【问题描述】:

我正在尝试使用 AbcPdf .net 组件(版本 7)来处理一些 PDF 并生成元数据。我想知道是否有办法列出pdf文档中的所有标签?作为带标签的 pdf 的示例,我正在使用此文件 here

是否有其他组件或工具可用于列出或提取 pdf 标签?

提前感谢您的帮助

【问题讨论】:

    标签: .net pdf abcpdf


    【解决方案1】:

    使用 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 Function
    

    ITextSharp 也有处理标签的方法。

    【讨论】:

      猜你喜欢
      • 2014-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多