![]() Am I doing something wrong, or is this an issue with the XPS print driver?īTW, I am using VS 2010 /. If I print to Adobe PDF, it defaults the file name to the print document name + ".PDF" (ideal behavior), but the built-in XPS print driver seems to lack this feature, and even seems to be ignoring the PrintFileName property. ![]() Right-click on the icon labeled 'Microsoft XPS Document Writer' and choose the 'Remove device' option. Actual printing code from this point onward. Open the Start menu and click on 'Devices and Printers.' 2. Throw new Exception("Error: cannot find the default printer.") If (printDlg.ShowDialog() = DialogResult.OK) PrintDocument printDoc = new PrintDocument() Then you’ll see the option to add the Microsoft XPS Document Writer. Under Manufacturer, scroll down and select Microsoft. As you step through the wizard, you’ll come to the Install the printer driver screen. (Remember to replace user-name with your original username. PrintDialog printDlg = new PrintDialog() Go to Control Panel > Hardware and Sound > Add a printer. The MXDW printer saves files in the Documents folder: C:Usersuser-nameDocuments. Heres how you can find out if XPS Viewer is installed on your Windows 10 PC, as well as how to install it if. and tried setting the PrinterSettings.PrintFileName as suggested in the answers, but it does not seem to work. 1.Add XPS Viewer to your computer if necessary. Some XPS files may instead be related to Action Replay files used with some video games, but Microsofts format is much more common. Way to default the name of the generated XPS file? You can make an XPS file in Windows by 'printing' to Microsoft XPS Document Writer (that option appears when asked which printer to use). I'd like it to default to a more useful name instead (ideally, using the document name I am providing). NET application, the user is presented with a file dialog where the file name is initially "*.XPS". ![]() When the Microsoft XPS Document Writer is selected for printing from my.
0 Comments
Leave a Reply. |