0

I need to print a document on Windows and record a searchable PDF in a remote database.

Presently, I can print to a remote CUPS server which is modified to save the PDF to a database. But every Windows printer driver I've used makes the document non-searchable (I can test this by printing to a file with the driver, whether it's PostScript or Print to PDF).

I've been thinking that the next step is to write a driver or driver plug-in which will preserve the searchability of a document. This means writing code that converts from an EMF file to RAW, described here https://learn.microsoft.com/en-us/windows-hardware/drivers/print/introduction-to-print-processors.

Writing a Windows Printer Driver would suggest that I could do this with a simple UI plugin.

Is there an easier way to go about this? Would love a second (or third, or fourth) opinion.

1 Answers1

1

Yes, writing a printer driver would be the way to go here. I think writing a driver per-se is not that hard, although I have never personally done it. The fact that they run in user mode makes it much easier than having to write a kernel-level driver.

To convert those GDI calls into PDF, you should look for some kind of library as this is a complex task. Some info for you here, else ... Goooooooooooooogle!

Paul Sanders
  • 24,133
  • 4
  • 26
  • 48