mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
[BUGFIX] Add option to override poppler data dir (resolves #572)
This commit is contained in:
parent
c9235e5d5f
commit
a479f2fc1e
@ -75,6 +75,7 @@ struct Param
|
|||||||
// misc.
|
// misc.
|
||||||
int clean_tmp;
|
int clean_tmp;
|
||||||
std::string data_dir;
|
std::string data_dir;
|
||||||
|
std::string poppler_data_dir;
|
||||||
std::string tmp_dir;
|
std::string tmp_dir;
|
||||||
int debug;
|
int debug;
|
||||||
int proof;
|
int proof;
|
||||||
|
@ -198,6 +198,7 @@ void parse_options (int argc, char **argv)
|
|||||||
.add("clean-tmp", ¶m.clean_tmp, 1, "remove temporary files after conversion")
|
.add("clean-tmp", ¶m.clean_tmp, 1, "remove temporary files after conversion")
|
||||||
.add("tmp-dir", ¶m.tmp_dir, param.tmp_dir, "specify the location of temporary directory.")
|
.add("tmp-dir", ¶m.tmp_dir, param.tmp_dir, "specify the location of temporary directory.")
|
||||||
.add("data-dir", ¶m.data_dir, param.data_dir, "specify data directory")
|
.add("data-dir", ¶m.data_dir, param.data_dir, "specify data directory")
|
||||||
|
.add("poppler-data-dir", ¶m.poppler_data_dir, param.poppler_data_dir, "specify poppler data directory")
|
||||||
.add("debug", ¶m.debug, 0, "print debugging information")
|
.add("debug", ¶m.debug, 0, "print debugging information")
|
||||||
.add("proof", ¶m.proof, 0, "texts are drawn on both text layer and background for proof.")
|
.add("proof", ¶m.proof, 0, "texts are drawn on both text layer and background for proof.")
|
||||||
|
|
||||||
@ -387,7 +388,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
bool finished = false;
|
bool finished = false;
|
||||||
// read config file
|
// read config file
|
||||||
globalParams = new GlobalParams();
|
globalParams = new GlobalParams(!param.poppler_data_dir.empty() ? param.poppler_data_dir.c_str() : NULL);
|
||||||
// open PDF file
|
// open PDF file
|
||||||
PDFDoc * doc = nullptr;
|
PDFDoc * doc = nullptr;
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user