How can I get poppler to use the extra encoding data in a non-standard directory?

StackOverflow https://stackoverflow.com/questions/16249192

  •  13-04-2022
  •  | 
  •  

I'm testing pdftotext as a part of poppler. It came pre-installed on the shared host that I'm using. I'd like to add the poppler encoding data which contain language packs to help combat errors such as "Missing language pack for 'Adobe-GB1' mapping".

Since it doesn't appear that I have permission to install the encoding data in the recommended directory on my shared host (/usr/share/poppler), how can I tell poppler where I've placed the data so that it will get used?

The pdftotext man page doesn't appear to describe any flags that would point to the data packages.

pdftotext resides at /usr/bin/pdftotext

有帮助吗?

解决方案

Sorry, that seems not to be possible.

Assuming that your hoster uses Linux, the file relevant to reading the encoding data is GlobalParams. Lines 170 and 677 deal with initializing the base data directory and the paths for encodings, and these use compile-time hard-coded values for the base directory. There is no facility to pass arguments to poppler (and, as a consequence, to any package depending on it), and there also is no user-writable configuration file like for many other Linux software packages to change that behavior.

Your best chance is to ask your hosting provider to install these features for you. Many smaller providers will react friendly towards such a request. Otherwise, you'll have to change your provider.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top