PDF bullets are coming as question marks while parsing with Apache Tika in java

后端 未结 1 619
名媛妹妹
名媛妹妹 2020-12-20 06:49

I am parsing PDF files using Apache Tika (tika-app-1.3) with this code:

InputStream input = new FileInputStream(\"Introduction.pdf\");  
AutoDetectParser par         


        
相关标签:
1条回答
  • 2020-12-20 07:39

    The problem is most likely either the encoding your program is using to write to your console not matching the encoding the console is using to process the output of your program, or the font used by your console may not have a glyph for the character. See this answer.

    One way to check is to print the numeric value of the characters in your string. Then you'll know if the text contains a ? (U+003F) or not.

    It may even be that the PDF contains an image for the bullet instead of a character.

    0 讨论(0)
提交回复
热议问题