Quantcast
Channel: Ghostscript.NET
Viewing all 393 articles
Browse latest View live

New Post: how to convert pcl into pdf using ghostscript in C#.Net

$
0
0
I don't see an answer here. Did you ever figure it out? I'd like to use it to accept an imported PCL file, determine the appropriate tray calls per page, and output as a PDF.

Is that possible?

New Post: how to convert pcl into pdf using ghostscript in C#.Net

$
0
0
Hi,

What you are looking for is GhostPCL which is not part of the Ghostscript.NET.

You can download GhostPCL from here: http://www.ghostscript.com/download/gpcldnld.html

To convert pcl to pdf you can use .NET Framework Process.Start method to run something like this: "pcl6-9.15-win32.exe -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=c:\test.pdf c:\test.pcl"

I hope this helps.

Cheers,
Josip

New Post: how to convert pcl into pdf using ghostscript in C#.Net

$
0
0
Thanks, but will it let me grab the tray calls?

New Post: how to convert pcl into pdf using ghostscript in C#.Net

New Post: how to convert pcl into pdf using ghostscript in C#.Net

New Post: Get progress for a single page?

$
0
0
Hi,

The thing is that the Native Ghostscript library doesn't support any progress events/callbacks except the Page number that's being processed at that time. So, I'm afraid that what you are looking for is not possible.

Cheers,
Josip

New Post: how to convert pcl into pdf using ghostscript in C#.Net

New Post: Get progress for a single page?

$
0
0
Thanks for your response. Maybe it could be possible if feeding the input using a pipe and just monitor how much data GS already "ate" ...

New Post: Get progress for a single page?

$
0
0
Hi,

I'm afraid that this will not be helpful....

The thing is that the PDF language, unlike the PostScript language, inherently requires random access to the file. If you provide PDF directly to Standard Input or via PIPE, Ghostscript will copy it to a temporary file before interpreting the PDF.

Cheers,
Josip

Updated Wiki: Home

$
0
0

Ghostscript.NET (written in C#) is the most completedmanaged wrapper library around the Ghostscript library (32-bit & 64-bit), an interpreter for the PostScript language, PDF, related software and documentation.

Source code here is not up-to-date. Latest source code and binaries (v.1.1.9) can be found onGitHubhttps://github.com/jhabjan/Ghostscript.NET

Contains:

  • GhostscriptViewer - View PDF, EPS or multi-page PostScript files on the screen
  • GhostscriptRasterizer - Rasterize PDF, EPS or multi-page PostScript files to any common image format.
  • GhostscriptProcessor - An easy way to call a Ghostscript library with a custom arguments / switches.
  • GhostscriptInterpreter - The PostScript interpreter.

Other features:

  • allows you to rasterize files in memory without storing the output to disk.
  • supports zoom-in and zoom-out.
  • supports progressive update.
  • allows you to run multiple Ghostscript instances simultaneously within a single process.
  • compatible with 32-bit and 64-bit Ghostscript native library.

NuGet: PM> Install-Package Ghostscript.NET

Used in the Ghostscript Studio (Ghostscript IDE)

                                                       

Samples built on the top of the Ghostscript.NET library:

Ghostscript.NET.Viewer (supports viewing of the PDF, EPS and multi-page PS files)

  Ghostscript.NET.Viewer 

Direct postscript interpretation via Ghostscript.NET.

Cheers,
Josip Habjan
http://habjan.blogspot.com

Updated Wiki: Home

$
0
0

Ghostscript.NET (written in C#) is the most completedmanaged wrapper library around the native Ghostscript library (32-bit & 64-bit), an interpreter for the PostScript language, PDF, related software and documentation.

Source code here is not up-to-date. Latest source code and binaries (v.1.1.9) can be found onGitHubhttps://github.com/jhabjan/Ghostscript.NET

Contains:

  • GhostscriptViewer - View PDF, EPS or multi-page PostScript files on the screen
  • GhostscriptRasterizer - Rasterize PDF, EPS or multi-page PostScript files to any common image format.
  • GhostscriptProcessor - An easy way to call a Ghostscript library with a custom arguments / switches.
  • GhostscriptInterpreter - The PostScript interpreter.

Other features:

  • allows you to rasterize files in memory without storing the output to disk.
  • supports zoom-in and zoom-out.
  • supports progressive update.
  • allows you to run multiple Ghostscript instances simultaneously within a single process.
  • compatible with 32-bit and 64-bit Ghostscript native library.

NuGet: PM> Install-Package Ghostscript.NET

Used in the Ghostscript Studio (Ghostscript IDE)

                                                       

Samples built on the top of the Ghostscript.NET library:

Ghostscript.NET.Viewer (supports viewing of the PDF, EPS and multi-page PS files)

  Ghostscript.NET.Viewer 

Direct postscript interpretation via Ghostscript.NET.

Cheers,
Josip Habjan
http://habjan.blogspot.com

New Post: Get progress for a single page?

$
0
0
Hi Jossip,

ahh, I see. Reading the documentation sometimes helps a lot ;-)
Then I guess I'll simply count the output bytes because I'm redirecting them uncompressed to a pipe (same problem here: tiff24nc also needs random access so I'm using bmp16m instead). As I know the target size, this seems to be the only point to get somekind of progress.

Thanks for your help and this great project!

New Post: Unable to find the type or the namespace of Ghostscript

$
0
0
I don't know how to solve this problem.
I need to use Ghostscript.NET, so I downloaded Ghostscritp.NET.dll and put it in my folder project. So I added the reference do the dll.
But when I try to do "using Ghostscript.NET;" in my classes it gives me an error:

Unable to find the type or the namespace of Ghostscript

and doesn't let me compile the project. How can I solve this problem? I realy don't understand what I'm doing wrong.

New Post: Blank PNG file after conversion

$
0
0
In my software I make 2 pdf files from 1 using iTextSharp. I'd like to convert these files in 2 different PNG images using GS, but something strange happens. I use this code for the conversion:
GhostscriptRasterizer rasterizer = new GhostscriptRasterizer();

rasterizer.Open(newFilePath1, gsInfo, false);
Image image = rasterizer.GetPage(300, 300, 1);
image.Save(subDirPath + serCod + "_S1.png");
rasterizer.Close();

rasterizer.Open(newFilePath2, gsInfo, false);
image = rasterizer.GetPage(300, 300, 1);
image.Save(subDirPath + serCod + "_S2.png");
rasterizer.Close();
When I save the first image it shows like a blank page and the file name is the same of newFilePath1 without .pdf but with .png.
When I look at the second image with the same file name as newFilePath2 with .png instead of .pdf, it has the image of the newFilePath1 pdf file.
How can I solve this problem?

Created Unassigned: Incorrect path for GhostScriptViewer [2266]

$
0
0
Using the sample of GhostScriptViewer i've noticed that there are some paths that make GhostScriptViewer throw a FormatException (because it's trying to cast a string as a page number, whereas the page number is the folllowing message : Unrecoverable erro : stackunderflow[...]

It' happen when using a path like :
C:\échanges\COMMDIS\PROD\Affaires\CPEN\CPEN140002 - EDF CIPN - PSPR\10 Suivi\40 Ecarts contract\Développements .NET\...

Yes I know, a lot of unexpected caracter...

New Post: Suppress all dialogs

$
0
0
Hi josip,
I'm having the same problem, I have all the parameters and I am capable of printing by bash.
Am I missing anything or is this a bug?

My switches:
      string printerName = "MyPrinter";
      string inputFile = @"C:\my.pdf";

       List<string> switches = new List<string> {  "-empty", 
                                                            "-sDEVICE=mswinpr2", 
                                                            "-dBATCH", 
                                                            "-dNOPAUSE", 
                                                            "-dNOPROMPT",
                                                            "-dNoCancel",
                                                            @"-sOutputFile=""%printer%" + printerName+@"""",                                                
                                                            "-q", 
                                                            "-f", inputFile };
wich is the same i use on bash
gswin32c.exe -dBATCH -dNOPAUSE -dNOPROMPT -dNoCancel -sDEVICE=mswinpr2 -sOutputFile="%printer%MyPrinter" -q -f "C:\my.pdf"
If you need more info please ask.

thanks in advance

New Post: Print PDF file?

$
0
0
Hi,

I'm new to ghostscript but I have managed to print a pdf file in a WPF application using the commandline api for Ghostscript and GSView.

This is my working code:
string gsExecutable = string.Format(@"{0}", _config.GhostScript_Executable_Path);
                    string gsViewExecutable = string.Format(@"{0}", _config.GSView_Executable_Path);
                    string printerName = _config.MyPrinterName;

                    string processArgs = string.Format("-ghostscript \"{0}\" -dPDFFitPage -copies=1 -all -printer \"{1}\" \"{2}\"", gsExecutable, printerName, PDFFilePath);

                    var gsProcessInfo = new ProcessStartInfo
                    {
                        WindowStyle = ProcessWindowStyle.Hidden,
                        FileName = gsViewExecutable,
                        Arguments = processArgs
                    };

                    using (var gsProcess = Process.Start(gsProcessInfo))
                    {
                        gsProcess.WaitForExit();

                        gsProcess.Disposed += (ps, pe) =>
                        {
                            //Printing success!!
                        };
                    }
I'm wondering now how I can achive this with the Ghostscript.NET library? Can someone help me with an example for the things I'm already doing in a Ghostscript.NET way?

Updated Wiki: Home

$
0
0

Ghostscript.NET (written in C#) is the most completedmanaged wrapper library around the native Ghostscript library (32-bit & 64-bit), an interpreter for the PostScript language, PDF, related software and documentation.

Source code here is not up-to-date. Latest source code and binaries (v.1.1.9) can be found onGitHubhttps://github.com/jhabjan/Ghostscript.NET

Contains:

  • GhostscriptViewer - View PDF, EPS or multi-page PostScript files on the screen
  • GhostscriptRasterizer - Rasterize PDF, EPS or multi-page PostScript files to any common image format.
  • GhostscriptProcessor - An easy way to call a Ghostscript library with a custom arguments / switches.
  • GhostscriptInterpreter - The PostScript interpreter.

Other features:

  • allows you to rasterize files in memory without storing the output to disk.
  • supports zoom-in and zoom-out.
  • supports progressive update.
  • allows you to run multiple Ghostscript instances simultaneously within a single process.
  • compatible with 32-bit and 64-bit Ghostscript native library.

NuGet: PM> Install-Package Ghostscript.NET

 

If Ghostscript.NET has been helpful to you, consider donating.

Click here to lend your support to: Ghostscript.NET and make a donation at pledgie.com !

 

Used in the Ghostscript Studio (Ghostscript IDE)

                                                       

Samples built on the top of the Ghostscript.NET library:

Ghostscript.NET.Viewer (supports viewing of the PDF, EPS and multi-page PS files)

  Ghostscript.NET.Viewer 

Direct postscript interpretation via Ghostscript.NET.

Cheers,
Josip Habjan
http://habjan.blogspot.com

Updated Wiki: Home

$
0
0

Ghostscript.NET (written in C#) is the most completedmanaged wrapper library around the native Ghostscript library (32-bit & 64-bit), an interpreter for the PostScript language, PDF, related software and documentation.

Source code here is not up-to-date. Latest source code and binaries (v.1.1.9) can be found onGitHubhttps://github.com/jhabjan/Ghostscript.NET

Contains:

  • GhostscriptViewer - View PDF, EPS or multi-page PostScript files on the screen
  • GhostscriptRasterizer - Rasterize PDF, EPS or multi-page PostScript files to any common image format.
  • GhostscriptProcessor - An easy way to call a Ghostscript library with a custom arguments / switches.
  • GhostscriptInterpreter - The PostScript interpreter.

Other features:

  • allows you to rasterize files in memory without storing the output to disk.
  • supports zoom-in and zoom-out.
  • supports progressive update.
  • allows you to run multiple Ghostscript instances simultaneously within a single process.
  • compatible with 32-bit and 64-bit Ghostscript native library.


If you have found Ghostscript.NET useful and has contributed to your projectconsider donating. Donating helps support Ghostscript.NET.

Click here to lend your support to: Ghostscript.NET and make a donation at pledgie.com !

 

NuGet: PM> Install-Package Ghostscript.NET

 

Used in the Ghostscript Studio (Ghostscript IDE)

                                                       

Samples built on the top of the Ghostscript.NET library:

Ghostscript.NET.Viewer (supports viewing of the PDF, EPS and multi-page PS files)

  Ghostscript.NET.Viewer 

Direct postscript interpretation via Ghostscript.NET.

Cheers,
Josip Habjan
http://habjan.blogspot.com

New Post: Regarding conversion of PDF files

$
0
0
Hi,

I have few questions regarding Ghostscript.Net
  1. Does Ghostscript.Net support PDF to SVG conversion?
  2. Does Ghostscript.Net support PDF to TIFF conversion?
  3. If ghostscript supports PDF to TIFF conversion, will it also support converting a multipage PDF to a single TIFF file(since TIFF supports multiple images in a file)?
Thanks.
Viewing all 393 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>