PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 6:49 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: PdfFilePrinter
PostPosted: Mon Nov 05, 2007 6:39 pm 
Offline

Joined: Tue Oct 30, 2007 2:54 pm
Posts: 6
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


Top
 Profile  
Reply with quote  
 Post subject: PathToAdobeReader
PostPosted: Tue Nov 04, 2008 10:52 pm 
Offline

Joined: Tue Nov 04, 2008 10:49 pm
Posts: 1
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 361 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group