We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 6120 - wrong pdftotext and pstotext lines in the config file
wrong pdftotext and pstotext lines in the config file
Product: OJS
Classification: Unclassified
Component: Search/Indexing
PC Linux
: P5 enhancement
Assigned To: PKP Support
Depends on:
  Show dependency treegraph
Reported: 2010-11-03 05:19 PDT by Bozana Bokan
Modified: 2011-09-14 17:45 PDT (History)
2 users (show)

See Also:
Version Reported In:
Also Affects:

Patch against OJS 2.3.3-3 (986 bytes, patch)
2010-11-03 14:03 PDT, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bozana Bokan 2010-11-03 05:19:08 PDT
there are two '%s' in the pdftotext and pstotext lines in the config file:
; 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
Comment 1 jerico 2010-11-03 11:59:47 PDT
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.
Comment 2 Alec Smecher 2010-11-03 14:03:54 PDT
Created attachment 3320 [details]
Patch against OJS 2.3.3-3
Comment 3 Alec Smecher 2010-11-03 14:04:33 PDT
This is actually a typo in the default config file -- only one of the %s tokens is needed. See the attached patch.
Comment 4 Alec Smecher 2011-09-14 17:45:08 PDT
Fixed config file typo