Dears,
I'm working on a legacy application using winform (.net 4.0 & c#).
The client application is installed on a machine accessible only via RDC or VDI. The OS is Windows 7 or higher.
The client application must be able to print PDF files from that machine to the local printer (local or network) installed on the client machine. This means that the printer selected via RDC is a redirected printer using the TS easy print drivers. Those
drivers don't allow the usage of RAW printing.
The printing method used before were:
- Copy of the files directly on the UNC of the printer (\\printername\dc)
- Usage of ImportDll and calls to OpenPrinter, StartDocPrinter, WritePrinter, ....
Both of those solutions don't work anymore because:
- The network printers are not on the same domain anymore and therefore not accessible directly from the RDC.
- The WritePrinter method don't work anymore since the easy print drivers don't understand RAW printing.
So, here comes my question. How can I print on those printer? Do I have to create an EMF file for the printing? If yes, how can I use my PDF file and create an EMF file containing the information? Is there other solutions (modifying the group policy is not
an option since we don't want to install the drivers of the different clients that will connect)?
In last resort, the usage of a library could be foreseen but a long discussion with the management will be necessary (so I hope other solutions exists). Is there some third party library that you could advice?
Also, I tried printing in that environment using PrintDocument.Print(). That is working as expected but with that solution the problem is to convert the pdf to a drawable format (one image per page or other ...).
Thanks in advance,
Benoit Delfosse
Senior .Net Developer/Architect