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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With