Writing a Virtual Printer in .NET

I desire to then develop an installer that sets up both the printer and the.NET application. It would we really nice to be able to write it all in C#, however I have a feeling that this will need a printer motorist to be composed is unmanaged code.

Check out http://www.printerplusplus.com. It is open source.NET virtual printer. It provides you an installer and a.NET class for composing code to process your “printer data”.

I think you will need to do a lot of WinAPI wrapping. Start researching on Windows Motorist Development Package to discover the things you need to do.

Set up printer and application from a single installer. User prints something with your chauffeur and while the application listens to the internal port.

If you carry out certainly not have it installed currently, Start by downloading Microsoft window Vehicle driver Set (WDK). When putting up choose to add the expansion for Visual Studio at the same time in the last step. In your Graphic Center 2017 Install you demand to have Desktop computer improvement with C++ to possess the best SDKs. , if you don’t possess it observe the anser provided beneath on methods to add it.

Open the option documents in Visual Workshop 2015.
Include all non-binary documents (usually found in the \ put together directory website of the sample) to the Planning task: a. In the Solution Explorer, perfect click Driver Information b. Select Include, at that point click on Existing Product c. Get through to the area to which you downloaded the sample, as well as select all the files in the established listing internet site, or the similar set of non-binary data like INFs, INIs, GPD, PPD reports, and so on d. Click on Include.
Establish these data to become included in to the chauffeur package: a. In the left side glass, click on Setup Home > Vehicle Driver Put Together > Bunch Record. In the best pane, utilize the ellipsis switch (…) to scan to the set of documents that needs to become consisted of to the driver program.
In the Variation area, add a reference to a catalog file similar to this: CatalogFile= XpsDrvSmpl.cat. This proposes that there is actually no design particular directory in this particular driver. If you give numerous architectures concurrently, you will certainly call for to collect the motorist INF manually.

Scan to the folder <UnzipFolder>\ print \ XPSDrvSmpl as well as open XPSDrvSmpl.sln in Visual Studio.

To establish a driver choice using Windows Driver Put (WDK) 10 and Visual Studio 2015, perform the observing steps.

Why guideline out using an alternate approach. Like making use of a more advanced all established helped make publishing program, including those readily available Print-to-PDF application. Then all you need to have is to decode PDF using some third event collection (which possesses absolutely cost-free as well as opensource variation very) instead of splitting your head to change the tire. There are various other Print-to-XXX treatment which you could likewise think about relying on the style you please.

Follow Microsofts own resource on GitHub. As you can easily see it is for Visual Center 2015 nonetheless I believe it is actually the same for 2017 (not checked out however):.

Presently, Visual Workshop 2015 will certainly have the ability to develop a driver strategy and output the data to disk. So as to prepare up motorist finalizing as well as deployment, find Developing, Assessing, as well as Deploying Drivers.

.

I don’t thing interpreting PDF technique is any good either. I have no idea why you desire to do what you desire to do. Perhaps you’re attempting to compose a PDF printer of your very own.

I think you need to really offer the Windows Motorist Advancement thing an appearance. If you want to develop a printer driver, I believe you’ll need to do it in C++.

If I keep in mind properly Microsoft does not support.NET within printer chauffeur advancement. The site “Printer Motorist Resource Toolkit” does not say that the chauffeur has actually been composed in.NET.

Leave a Reply

Your email address will not be published. Required fields are marked *