iTextSharp library does not extract text from my file

后端 未结 2 1272
清歌不尽
清歌不尽 2020-12-22 08:26

iTextSharp library (version 5.5.5) does not extract text from my file. I can copy and paste text from pdf into Notepad. I uploaded file to this link.

The source code

2条回答
  •  被撕碎了的回忆
    2020-12-22 09:18

    I have addition to the answer given by @mkl. Here is how to notify iTextSharp that Asian dlls are in the project. You need to add static constructor of yours text extraction class:

    static PdfDocument()
    {
        iTextSharp.text.io.StreamUtil.AddToResourceSearch("iTextAsian.dll");    
        iTextSharp.text.io.StreamUtil.AddToResourceSearch("iTextAsianCmaps.dll");
    }
    

提交回复
热议问题