Bug 6120 - wrong pdftotext and pstotext lines in the config file
wrong pdftotext and pstotext lines in the config file
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: Search/Indexing
2.3.4
PC Linux
: P5 enhancement
Assigned To: PKP Support
Depends on:
Blocks:
  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:


Attachments
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:
; 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
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
https://github.com/pkp/ocs/commit/4311044842fc24403951dec8b4a3292304e11285