1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

Merge pull request #609 from Teddytrombone/master

[BUGFIX] Add option to override poppler data dir (resolves #572)
This commit is contained in:
Lu Wang 2016-02-15 21:45:58 +01:00
commit 2041c5d66e
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -198,6 +198,7 @@ void parse_options (int argc, char **argv)
.add("clean-tmp", &param.clean_tmp, 1, "remove temporary files after conversion") .add("clean-tmp", &param.clean_tmp, 1, "remove temporary files after conversion")
.add("tmp-dir", &param.tmp_dir, param.tmp_dir, "specify the location of temporary directory.") .add("tmp-dir", &param.tmp_dir, param.tmp_dir, "specify the location of temporary directory.")
.add("data-dir", &param.data_dir, param.data_dir, "specify data directory") .add("data-dir", &param.data_dir, param.data_dir, "specify data directory")
.add("poppler-data-dir", &param.poppler_data_dir, param.poppler_data_dir, "specify poppler data directory")
.add("debug", &param.debug, 0, "print debugging information") .add("debug", &param.debug, 0, "print debugging information")
.add("proof", &param.proof, 0, "texts are drawn on both text layer and background for proof.") .add("proof", &param.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