1
votes

I'm trying to do a conversion of a PDF to text with ghostscript with this command : -dBATCH -dNOPAUSE -sDEVICE=txtwrite -sOutputFile=bla.txt c:\temp\example.pdf

My problem is with the seperation of the fields/columns. Some of my fields get seperated without any space or tab inbetween, for example three columns "CAT", "DOG", "12345" will ouput as CATDOG12345.

Is there any way I can specify a delimiter to be used, so my text would come out "CAT|DOG|12345"?

Thanks in advance

1

1 Answers

0
votes

You could modify the source. However, this simply should not happen unless the original had no space between the text frgaments. You don't say what version of Ghostscript you are using, and you haven't supplied an example, so its not really possible to say more.

You could always output the text in pseudo-XML format and pick up the fragments and their locations yourself.