Reputation: 1894
i'm trying to extract the text from a PDF. I'm working with Ghostscript but when i run the command below
gs -dBATCH -dNOPAUSE -sDEVICE=txtwrite mypdf.pdf
an error occurs. This one below.
Unknown device: txtwrite
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
defaultdevice
Any idea about it? Isn't txtwrite a default ghostscript device ?
This is the output of gs -v
GPL Ghostscript 8.70 (2009-07-31)
and that one the OS Version CentOS release 5.8 (Final)
.
Upvotes: 3
Views: 3447
Reputation: 31141
The txtwrite device was introduced to Ghostscript in 9.05 if I remember correctly (current version is 9.06). 8.70 is really quite old and much too old to include this device.
Upgrade to a more recent version.
Upvotes: 8