Это должно работать для вас (используя Ghostscript. Processor; namespace Add(“-sOutputFile=%printer%” + printerName); switches. how to print the pdf file? using c# and any free tool(*.dll) is there to develop. Finally i solve my problem using 1. This article aims at using C# and Ghostscript to convert various other documents into PDF. As the Ghost PDF printer is a postscript printer, it will create the printable format of the file as . so that i can add the dll for GhostsScript in my project.

Author: Samuro Dusho
Country: Gabon
Language: English (Spanish)
Genre: Spiritual
Published (Last): 14 May 2012
Pages: 161
PDF File Size: 18.99 Mb
ePub File Size: 17.35 Mb
ISBN: 238-1-36014-239-4
Downloads: 57770
Price: Free* [*Free Regsitration Required]
Uploader: Maulrajas

It is working fine when normal web application but when I published that application at that time I get this type of error. Not anything that I know. Would appreciate if you had any ideas on this. In order to make a process object do some operations on a file, the file type must be registered to some application. After the print job completes, the process does not get disposed as the Application was running previously.

The printer is not initiated so ps file can not be produced. Ghostscript is a set of packages written in C language that interprets the PDF file format and is able to convert Postscript files to PDF and vice versa. So if you want to print any file, you should have a default application associated with the file, that could read the file format and print the file. Hi, convertToPdf method return string only. Remember to get the installer for Windows. I got an error. Hi Bhuban, I got an like below.


You can also use 64bit same way Open visual studio to create project and install Ghostscript. During installation, the windows will popup the “Windows Logo Warning. The time taken to convert the document to PDF depends on the size of the document. This might be a problem, if you have not added it in your Application Startup path. Total number of pages in the document: This approach eliminate the problem with the popup when using html files.

Public, Private, and Hybrid Cloud: Post as a guest Name. A simple double click opens the file in IE.

Printing PDF using Ghostscript in C#

There is an error in the CreatePdf method where a command for generating Pdf file is provided. The error is related to MSWord, so I think you are trying to print a word document, and the user who is trying to print do not have access to msword. Can we save the. Amjad Abdullah sorry for the late answer ghostsript anyone else: For more details check http: Hoping to hearing from your side soon.

c# – распечатать pdf на указанный принтер – Qaru

Is it giving any kind of errors? Is this code aplicable to Windows Application only?


Hi, The archicle is very helpful. Hi Bhuban, I have a VB.

Do you have any solution to resolve this hanging of winword. In this case we get an InvalidOperationException.

In this case we get an InvalidOperationException. But we are now facing a problem where the process hangs at converttops step with winword. Dude, excellent article, really of gr8 help. Also can I distribute ghostscript to my client free? I will try to post a code snippet on this soon. We have to stop that process by force in Fhostscript.

Hello Steve, Yes, you can lock pdf by encrypting it. Please kindly guide me. Though it has limited options, it can be used to convert a lot ghoxtscript document formats into PDF.

Skip any other pages of the wizard. How to do through. What should i write on the click event of both button. If HTML file are registered to be opened with some default application, then the process will be executed successfully, else will throw errors. The ps file is not generated as the printer do not run on the server. Figure 7 During installation, the windows will popup prlnt “Windows Logo Warning.

Subscribe US Now