Saves this as a PDF formatted file, overwriting the file if it already exists. The full path and file name to save the printed document to. If is or whitespace. -or- refers
(string fileName)
| 52 | /// <exception cref="DirectoryNotFoundException">The specified path is invalid, such as being on an unmapped drive.</exception> |
| 53 | /// <exception cref="PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception> |
| 54 | public override void SaveAsFile(string fileName) |
| 55 | { |
| 56 | if (string.IsNullOrEmpty(fileName)) |
| 57 | { |
| 58 | throw new ArgumentException("The file name to be saved cannot be null or the empty string", nameof(fileName)); |
| 59 | } |
| 60 | |
| 61 | using (MemoryStream imageStream = new MemoryStream(this.AsByteArray)) |
| 62 | { |
| 63 | using (FileStream fileStream = new FileStream(fileName, FileMode.Create)) |
| 64 | { |
| 65 | imageStream.WriteTo(fileStream); |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | } |
nothing calls this directly
no outgoing calls
no test coverage detected