1

I am trying to develop virtual printer for my C# application using 3rd party open source software called Printer++.

I achieved to generate the postscript file in the temp directory, but I have no idea how to change it in to text format. I tried to use Gostscript and Postscript to Text converter from verydoc but it didn't work out.

Can you please give me some hint or C# sample of examples?

SSD
  • 1,373
  • 2
  • 13
  • 20
Redo
  • 11
  • 1

1 Answers1

1

With Ghostscript, use the txtwrite device to get text output from any input format that the Ghostscript family understands; PDF, PostScript, PCL, PXL or XPS.

Be aware that PostScript (indeed none of these PDLs) was never intended to allow you to work backwards form the output to retrieve the text in the original application input, any attempt to do so is highly heuristic in nature, depends heavily on the way the PostScript program has been assembled and in the general case cannot be guaranteed possible.

While I have a number of PostScript programs which work very successfully with this device, I also have others for which it is simply not possible (other than by rendering and using OCR) to get meaningful text out.

Since you presumably already have the text in your C# application, why are you trying to use Ghostscript to get the text back out again ?

KenS
  • 30,202
  • 3
  • 34
  • 51