PKP Bugzilla – Bug 6120
wrong pdftotext and pstotext lines in the config file
Last modified: 2011-09-14 17:45:08 PDT
there are two '%s' in the pdftotext and pstotext lines in the config file: ; PDF ; index[application/pdf] = "/usr/bin/pstotext %s -enc UTF-8 -nopgbrk %s - | /usr/bin/tr '[:cntrl:]' ' '" ; index[application/pdf] = "/usr/bin/pdftotext %s -enc UTF-8 -nopgbrk %s - | /usr/bin/tr '[:cntrl:]' ' '" ; PostScript ; index[application/postscript] = "/usr/bin/pstotext %s -enc UTF-8 -nopgbrk %s - | /usr/bin/tr '[:cntrl:]' ' '" the syntax is: command options files which means that the first '%s' shouldn't be there i tested it with pdftotext and i assume that it's the same for pstotext
A possible workaround for this problem is: Write a small wrapper script that takes only one parameter and put the pstotext command in there. Then point the configuration in config.inc.php to the wrapper script rather than directly to pdftotext.
Created attachment 3320 [details] Patch against OJS 2.3.3-3
This is actually a typo in the default config file -- only one of the %s tokens is needed. See the attached patch.
Fixed config file typo https://github.com/pkp/ocs/commit/4311044842fc24403951dec8b4a3292304e11285