Это должно работать для вас (используя 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: Zulkill Nataxe
Country: Libya
Language: English (Spanish)
Genre: Sex
Published (Last): 20 May 2007
Pages: 159
PDF File Size: 11.50 Mb
ePub File Size: 13.47 Mb
ISBN: 590-9-37594-662-4
Downloads: 37154
Price: Free* [*Free Regsitration Required]
Uploader: Nat

Do you have any suggestions where there’s the rub? Hidden; even if i give that its opening up that word and excel,is there pdint possiable way to hide that window popuing up One more thing, some word documents, particularly those which use tables, tend to be rendered inaccurately when it is converted to pdf.

Ghostscript.NET.dll распечатать pdf на указанный принтер

Hi Viruddhi, I am quoting your comment below. Thus, we need to catch this exception and ignore it for the normal operation of our job. You may get some info from the latest gs documentation. I appreciate your answer.


Print the pdf file

This is just a wild guess. I tried but the converttpPS section throws an error saying there is no application associated with the file. Stack Overflow works best with JavaScript enabled. But for this, you will have to use dlo that is available in the lib directory of ghostscript.

Now we are ready to print PostScript files through the installed printer. Thus, if we want to create a PDF file with the same name as the input file name, we can just replace the extension of the inputted file with. Hi, Let me first discuss what are we doing with the functions.

Forums – C# Corner

On the streams point, the command provided has to ghostscrjpt executed to get the output. We are converting a. Figure 9 As stated earlier, the conversion process is a two step process, one that converts the document to postscript and the other that converts the postscript file to PDF.

Let us create a small Windows application in C to make this whole process a reality. You can also check the arguments.

Convert Word to PS. Can we save the. Also can I distribute ghostscript to my client free? One thing that comes to my mind is that, you need to have gswin32c. If someone has the problem, that on a server deployed application isn’t able to create a ps file, then that may seriously be a problem with user restrictions on the server.


If you want the ps file, then you can copy it to some other location after converting the doc file to ps. On the distribution of ghostscript, it depends on the Ghoshscript.

c# – print pdf to specified printer – Stack Overflow

This file holds the driver details for the GhostScript Printer. Do you know if its possible to set orientation within the code when creating the PS file. ghostsctipt

I am working on a live project in. What we are actually doing here is that ghostsctipt are creating a Virtual Printer that prints to a.

Always i’ve tried to print. Figure 5 On the next screen provide the Printer Name. We then programatically use the gswin32c. What we are actually doing here is that we are creating a Virtual Printer that prints xll a. Alternatively, we can use launch the same wizard from command line.