C# Extract text from PDF using PdfSharp

后端 未结 3 1172
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 06:12

Is there a possibility to extract plain text from a PDF-File with PdfSharp? I don\'t want to use iTextSharp because of its license.

3条回答
  •  生来不讨喜
    2020-12-05 07:05

    PDFSharp provides all the tools to extract the text from a PDF. Use the ContentReader class to access the commands within each page and extract the strings from TJ/Tj operators.

    I've uploaded a simple implementation to github.

提交回复
热议问题