Reading the file that create from "Print to file" option
-
Hello friend, I think a lot of people in this board have ever been used "Print to file" option in Printer Dialog. That it can save our printing job to file and then print it out later. I want to create a program that can read that file. And the program also can revise the printer setting and page set up before the real printing. Please advise me some concept or article of this task. Thank you
-
Hello friend, I think a lot of people in this board have ever been used "Print to file" option in Printer Dialog. That it can save our printing job to file and then print it out later. I want to create a program that can read that file. And the program also can revise the printer setting and page set up before the real printing. Please advise me some concept or article of this task. Thank you
I assume you are talking about the .xps file. There is a COM API provided by Microsoft for working with this file format. See the documentation on MSDN[^] Grab the latest version of the Windows SDK[^], which you will need to comiple your project, but also has some great little samples under the folder
C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\xps
(alternativley you can download just the samples from http://code.msdn.microsoft.com/xps[^]). The documentation for these samples can be found on MSDN[^].