Font issue on Ubuntu machine in parsing PDF File
Asked Answered
G

1

9

I have an application on my Ubuntu 14.04.x Machine. This application does text mining on PDF files. I suspect that it is using Apache Tika etc...

The problem is that, during its reading process, I get the following warning:

2015-09-10 14:15:35 [WARN] FontManager Font not found: CourierNewPSMT
2015-09-10 14:15:36 [WARN] FontManager Font not found: CourierNewPSMT
2015-09-10 14:19:33 [WARN] FontManager Font not found: Helvetica
2015-09-10 14:19:34 [WARN] FontManager Font not found: ESQWSF+Helvetica
2015-09-10 14:19:34 [WARN] FontManager Font not found: ESQWSF+Helvetica
2015-09-10 14:19:34 [WARN] FontManager Font not found: ESQWSF+Helvetica
......

How can I get those fonts on my machine? Or is it some java lib that I am missing for fonts?

Glaze answered 10/9, 2015 at 18:24 Comment(5)
Did you check your FontManager.java on your linux machine?Hellenhellene
What should i check about it ?Glaze
Are you able to change the code? Is it your application or are you just running this application?Cliffordclift
This fonts are part of Microsoft core fonts, have you installed ttf-mscorefonts-installer deb package?Thigmotaxis
Yes I have it installed.Glaze
A
4

I would do a three step approach to fix this issue.

  1. Analyse what files are searched for and not found using strace
  2. Use apt-file to search for the package providing these files
  3. Install the missing package

1.) Install strace if it's not already installed sudo apt-get install strace

Check what files are used by your app:

$> strace <your app> 2>&1 | grep open

you can further filter this for ENOENT errors:

$> strace <your app> 2>&1 | grep open | grep ENOENT

Now you should know what files are missing.

2.) Check what package is providing this file. (dpkg -S only works for already installed packages)

su
apt-get install apt-file
apt-file update
apt-file search <filename>

3.) install that package using apt-get install <package>

I've no Ubuntu here, but the MS fonts are normally available in a package called "mscorefont" or similar.

Ahvenanmaa answered 23/9, 2015 at 9:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.