Skip to content

Commit

Permalink
Merge pull request coolwanglu#609 from Teddytrombone/master
Browse files Browse the repository at this point in the history
[BUGFIX] Add option to override poppler data dir (resolves coolwanglu#572)
  • Loading branch information
coolwanglu committed Feb 15, 2016
2 parents ce0fa97 + a479f2f commit 2041c5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Param.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct Param
// misc.
int clean_tmp;
std::string data_dir;
std::string poppler_data_dir;
std::string tmp_dir;
int debug;
int proof;
Expand Down
3 changes: 2 additions & 1 deletion src/pdf2htmlEX.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ void parse_options (int argc, char **argv)
.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("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("proof", &param.proof, 0, "texts are drawn on both text layer and background for proof.")

Expand Down Expand Up @@ -387,7 +388,7 @@ int main(int argc, char **argv)

bool finished = false;
// read config file
globalParams = new GlobalParams();
globalParams = new GlobalParams(!param.poppler_data_dir.empty() ? param.poppler_data_dir.c_str() : NULL);
// open PDF file
PDFDoc * doc = nullptr;
try
Expand Down

0 comments on commit 2041c5d

Please sign in to comment.