When I am trying to execute the following code,
Dim printer As PdfFilePrinter = New PdfFilePrinter("C:\TEMP\OutboundCorrespondence\" + _PdfOutputFile, _
PrinterName)
Try
printer.Print()
Catch ex As Exception
Console.WriteLine("Error: " + ex.Message)
End Try
I get the following exception
--------------------------------------------------------------
System.ComponentModel.Win32Exception: The system cannot find the path specified
at PdfSharp.Pdf.Printing.PdfFilePrinter.Print(Int32 milliseconds)
at PdfSharp.Pdf.Printing.PdfFilePrinter.Print()
at Bcbst.IM.Services.OutboundCorrespondence.PdfBatch.MergeAndPrint() in C:\Documents and Settings\J59546A\My Documents\Visual Studio 2005\Projects\OutboundCorrespondenceService\PdfBatch.vb:line 194
|