mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
change no-drm parameter to int, updated manpage
This commit is contained in:
parent
88467667a2
commit
30577ee546
@ -35,6 +35,9 @@ Specify owner password
|
||||
.B -u, --user-password <password>
|
||||
Specify user password
|
||||
.TP
|
||||
.B --no-drm <0|1> (Default: 0)
|
||||
Override document DRM settings
|
||||
.TP
|
||||
.B --dest-dir <dir> (Default: .)
|
||||
Specify destination folder
|
||||
.TP
|
||||
|
@ -18,7 +18,7 @@ struct Param
|
||||
// PDF stuff
|
||||
std::string owner_password, user_password;
|
||||
std::string input_filename, output_filename;
|
||||
bool no_drm;
|
||||
int no_drm;
|
||||
|
||||
// path
|
||||
std::string dest_dir, tmp_dir, data_dir;
|
||||
|
@ -64,7 +64,7 @@ void parse_options (int argc, char **argv)
|
||||
|
||||
.add("owner-password,o", ¶m.owner_password, "", "owner password (for encrypted files)", nullptr, true)
|
||||
.add("user-password,u", ¶m.user_password, "", "user password (for encrypted files)", nullptr, true)
|
||||
.add("no-drm", ¶m.no_drm, false, "override document DRM settings")
|
||||
.add("no-drm", ¶m.no_drm, 0, "override document DRM settings")
|
||||
|
||||
.add("dest-dir", ¶m.dest_dir, ".", "specify destination directory")
|
||||
.add("data-dir", ¶m.data_dir, PDF2HTMLEX_DATA_PATH, "specify data directory")
|
||||
@ -193,7 +193,7 @@ int main(int argc, char **argv)
|
||||
|
||||
// check for copy permission
|
||||
if (!doc->okToCopy()) {
|
||||
if (!param.no_drm) {
|
||||
if (param.no_drm == 0) {
|
||||
throw "Copying of text from this document is not allowed.";
|
||||
}
|
||||
cerr << "Document has copy-protection bit set." << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user