![]() 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. Check if XPS Viewer and XPS Services are enabled on your computer. Actual printing code from this point onward. Throw new Exception("Error: cannot find the default printer.") If (printDlg.ShowDialog() = DialogResult.OK) For Save as type, select either PDF or X PS Document. For File name, type a name for the publication. PrintDocument printDoc = new PrintDocument() Click File > Save & Send > Create PDF/XPS Document > Create PDF/XPS. PrintDialog printDlg = new PrintDialog() and tried setting the PrinterSettings.PrintFileName as suggested in the answers, but it does not seem to work. ![]() Way to default the name of the generated XPS file? Right Click on 'Microsoft Print to PDF' printer. 2015 Nov 8 UPDATE: Open Control Panel > All Control Panel Items > Devices and Printers. I'd like it to default to a more useful name instead (ideally, using the document name I am providing). I just found that if I check the 'Print To File' box, I can then specify where I want the. 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. |