PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Jun 15, 2024 8:23 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: Error for print
PostPosted: Wed Apr 04, 2012 7:08 pm 
Offline

Joined: Wed Apr 04, 2012 6:43 pm
Posts: 1
When I try to print the Adobe displays this error message:

"Acrobat could not open 'Acrobat.exe' because it is either not a supported file type or because the file has been damaged(for example, it was sent as an email attachement and wasn't correctly decoded).
To create an Adobe PDF document, go to the source application. Then print the document to Adobe PDF."



Follows the code:

Code:
   string caminhoPDF = "C:\\Program Files (x86)\\Adobe\\Acrobat 10.0\\Acrobat\\Acrobat.exe";
            PdfFilePrinter.AdobeReaderPath = caminhoPDF;
            var printer = new PdfFilePrinter(caminhoPDF, "\\192.168.1.10\\name_printer");
            printer.Print();


Any idea? Help-me!!


Top
 Profile  
Reply with quote  
 Post subject: Re: Error for print
PostPosted: Thu Apr 05, 2012 7:12 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
You are trying to print the file "acrobat.exe" using "acrobat.exe" - and Acrobat correctly says that this EXE file you are trying to print is not a valid PDF file.

The first parameter of PdfFilePrinter is the file to be printed - this should be a PDF, not an EXE file.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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 164 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group