Printer.PrintFileName Property
Gets or sets a value that specifies the file name of an Encapsulated PostScript file and the path to which the file will be saved when the PrintAction property is set to PrintToFile.
Namespace: Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
public string PrintFileName { get; set; }
public:
property String^ PrintFileName {
String^ get();
void set(String^ value);
}
member PrintFileName : string with get, set
Public Property PrintFileName As String
Property Value
Type: System.String
Returns a String that contains a file path and name.
Remarks
When the PrintAction property is set to PrintToFile, the print output will be saved to an Encapsulated PostScript file (.eps, .ps, or .ai). The PrintFileName property specifies the path and name of the file.
Note
To enable other applications to recognize the file as a PostScript file, you must use a PostScript file extension (.eps, .ps, or .ai) in the PrintFileName property.
If no PrintFileName is specified an exception occurs.
Note
The user is not prompted for a path or a file name extension. To make sure that the file has a valid path and extension, you can implement your own dialog box. To do this, use a SaveFileDialog component and assign the return value to the PrintFileName property before you call the Print method.
Note
Functions and objects in the Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.
Examples
The following example demonstrates how to display a dialog box to prompt a user for a file name and then assign it to the PrintFileName property.
Dim Printer As New Printer
Dim fileDialog As New Windows.Forms.SaveFileDialog
Dim fileToSave As String
fileDialog.Title = "Save to PostScript file"
fileDialog.AddExtension = True
fileDialog.Filter = "Encapsulated PostScript (*.eps)|"
See Also
Printer Class
Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 Namespace
bc1bcb98-e13b-4c68-a514-045c042dbf367f9351ea-cb3e-4615-8f70-5a29c165c1a74e434922-3709-49c6-a69d-38120ed72d7a
Return to top