View previous topic :: View next topic |
Author |
Message |
jra2007
Joined: 30 Oct 2007 Posts: 6
|
Posted: Mon Nov 05, 2007 6:39 pm Post subject: PdfFilePrinter |
|
|
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 |
|
Back to top |
|
|
stebo0728
Joined: 04 Nov 2008 Posts: 1
|
Posted: Tue Nov 04, 2008 10:52 pm Post subject: PathToAdobeReader |
|
|
hey, you have to set the static variable of PdfFilePrinter.PathToAdobeReader to the either adobereader or acrobat executable file before you call Print(), are you doing this? also you need to define the default printer name if you do not use the Print method that calls for a printer name |
|
Back to top |
|
|
|