Package: poppler-utils
Version: 0.12.4-1.1
Severity: normal
Today I stubled upon this crippling "feature" of poppler-utils.
I agree that the API shouldn't be changed (the API itself does not enforce
anything), but at least pdftohtml and pdftoabw should be patched.
Could you please add this patch to fix those two utilities?
diff -ru poppler-0.12.4/utils//pdftoabw.cc poppler-0.12.4.x/utils//pdftoabw.cc
--- poppler-0.12.4/utils//pdftoabw.cc 2010-01-17 01:06:57.000000000 +0100
+++ poppler-0.12.4.x/utils//pdftoabw.cc 2010-09-15 13:08:51.803755406 +0200
@@ -152,10 +152,12 @@
}
// check for copy permission
+#ifdef ENFORCE_PERMISSIONS
if (!doc->okToCopy()) {
fprintf(stderr, "Copying of text from this document is not allowed.\n");
goto error;
}
+#endif
XMLdoc = xmlNewDoc(BAD_CAST "1.0");
abwOut = new ABWOutputDev(XMLdoc);
diff -ru poppler-0.12.4/utils//pdftohtml.cc poppler-0.12.4.x/utils//pdftohtml.cc
--- poppler-0.12.4/utils//pdftohtml.cc 2010-01-17 01:06:57.000000000 +0100
+++ poppler-0.12.4.x/utils//pdftohtml.cc 2010-09-15 13:08:35.307755289 +0200
@@ -199,6 +199,7 @@
}
// check for copy permission
+#ifdef ENFORCE_PERMISSIONS
if (!doc->okToCopy()) {
if (!noDrm) {
error(-1, "Copying of text from this document is not allowed.");
@@ -206,6 +207,7 @@
}
fprintf(stderr, "Document has copy-protection bit set.\n");
}
+#endif
// construct text file name
if (argc == 3) {