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

New Post: some PDFs cannot be converted

$
0
0
I am using one of the samples to convert the first page of the selected PDF to PNG.

public void PDF2PNGFirstPage(string PdfFilePath, string OutputFilePath)
    {
        int desired_x_dpi = 96;
        int desired_y_dpi = 96;

        _lastInstalledVersion =
            GhostscriptVersionInfo.GetLastInstalledVersion(
                    GhostscriptLicense.GPL | GhostscriptLicense.AFPL,
                    GhostscriptLicense.GPL);

        _rasterizer = new GhostscriptRasterizer();
        _rasterizer.Open(PdfFilePath, _lastInstalledVersion, true);

        Image img = _rasterizer.GetPage(desired_x_dpi, desired_y_dpi, 1);
        img.Save(OutputFilePath, ImageFormat.Png);
    }
Practically the only thing I changed is that i fixed the pgae number for _rasterizer.GetPage, it is constantly set to 1.

The problem is that the code works only with some PDFs (it can be multipage PDF of course). Some PDF-s throw "input string was not in a correct format". Any ideas?

I have GhostScript 9.10 32bits installed.

New Post: some PDFs cannot be converted

New Post: some PDFs cannot be converted

$
0
0
Hi,

I tried this pdf on both 32 bit and 64 bit Ghostscript.NET and it works. I have a feeling that this is due dacritics. Can you tell me does your 'PdfFilePath' contains any diacritics like 'ćšäö'?

If yes, can you try to encode your 'PdfFilePath' to UTF8 like this:
string PdfFilePath = @"e:\äbc.pdf"; 
PdfFilePath= System.Text.Encoding.Default.GetString(System.Text.Encoding.UTF8.GetBytes(PdfFilePath)); 
and then use it in
_rasterizer.Open(PdfFilePath, _lastInstalledVersion, true);
Cheers,
Josip

New Post: Invert Image colors

$
0
0
Hi,

I'm glad you manage to work this out.

Cheers,
Josip

New Post: some PDFs cannot be converted

$
0
0
Thank you for your quick reply. Obviously it contains diacritics, I will try your suggestion.

New Post: Error when trying to run a processor

$
0
0
Thanks Josip,

I did the test with the same parameters as you and it worked fine (good!).
I experimented with my modified code and failed (bad! :( ).

I checked, and the new problem is in the quotes used to avoid path with spaces.

example:

-o"c:\path\with spaces\file.png"

This causes the argument error.

For now I removed the quotes and I'll make sure not to have path with spaces, but I would like to know how you can fix that.

thank you very much
Alejandro

New Post: Error when trying to run a processor

$
0
0
Hi Alejandro,

You don't need quotes, simply set the folder after the switch as it is...

This works:
        private List<string> GetArgs()
        {
            List<string> args = new List<string>();
            args.Add("-empty"); // this one will not be used but it must be here
            args.Add("-sDEVICE=pnggray");
            args.Add(@"-oE:\folder with whitespaces\test.png");
            args.Add("-f");
            args.Add(@"E:\folder with whitespaces\test.pdf");
            return args;
        }
Cheers,
Josip

New Post: some PDFs cannot be converted

$
0
0
I checked it. The path (or file) names with special characters definitely cause problems. I can covert the sample PDF I uploaded formerly, but still have issues ("object reference is not set...") with some files. I uploaded another problematic sample (placed it into the same directory from wehere I can succesfuly convert the first pdf). Would you please check this as well?

Sample #2

Commented Unassigned: SystemFormatException if PDF Filename contains diacritics [2129]

$
0
0
If the PDF file name contains diacritics e.g."Verträge.pdf" a format exception "Input string was not in a correct format." is thrown:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Ghostscript.NET.Viewer.GhostscriptViewerPdfFormatHandler.StdOutput(String message)
at Ghostscript.NET.Viewer.GhostscriptViewerStdIOHandler.StdOut(String output)
at Ghostscript.NET.GhostscriptStdIO.gs_std_out(IntPtr handle, IntPtr pointer, Int32 count)
at Ghostscript.NET.Interpreter.GhostscriptInterpreter.Run(String str)
at Ghostscript.NET.Viewer.GhostscriptViewerFormatHandler.Execute(String str)
at Ghostscript.NET.Viewer.GhostscriptViewerPdfFormatHandler.Open(String filePath)
at Ghostscript.NET.Viewer.GhostscriptViewer.Open()
at Ghostscript.NET.Viewer.GhostscriptViewer.Open(String path, GhostscriptVersionInfo versionInfo, Boolean dllFromMemory)

I checked various diacritics like ćšäö and the exception is always thrown.
As a workaround the Open(MemoryStream stream, GhostscriptVersionInfo versionInfo, bool dllFromMemory) overload works like a charm
Comments: ** Comment from web user: McZosch **

Same problem here.

The Unicode-workaround doesn't solve this.

The only working workaround is to read the file into a MemoryStream and then pass it to GhostScript. This adds a certain overhead, as Ghostscript.NET.Rasterizer.GhostscriptRasterizer.Open not available in a plain System.IO.Stream-signature method.

Sincerely, Markus

Source code checked in, #29507

$
0
0
Fixed the default cropping to the BoundingBox problem for the EPS file format in the GhostscriptViewer and GhostscriptRasterizer (reported by "midora"). Exposed GhostscriptViewer.EPSClip and GhostscriptRasterizer.EPSClip properties with a default value set to true (affects only EPS format). Fixed problem with the paths that contains diacritics (reported by "GambitRicky"). Added GhostscriptProcessor.Started and GhostscriptProcessor.Completed events. (requested by "Ray H."). All methods that works with MemoryStream are changed to use a generic Stream type (suggested by "midora").

Created Release: Ghostscript.NET v.1.1.5. (Mar 20, 2014)

$
0
0
v.1.1.5.
  • fixed the default cropping to the BoundingBox problem for the EPS file format in the GhostscriptViewer and GhostscriptRasterizer (reported by "midora").
  • exposed GhostscriptViewer.EPSClip and GhostscriptRasterizer.EPSClip properties with a default value set to true (affects only EPS format).
  • fixed problem with the paths that contains diacritics (reported by "GambitRicky")
  • added GhostscriptProcessor.Started and GhostscriptProcessor.Completed events (requested by "Ray H.").
  • all methods that works with MemoryStream are changed to use a generic Stream type (suggested by "midora").

v.1.1.4.
  • fixed problem with applying GraphicsAlphaBits and TextAlphaBits which improved antialiasing in GhostscriptViewer and GhostscriptRasterizer.
  • fixed problem with output through main stderr callback handler.
  • added support for MemoryStream in the GhostscriptPdfInfo.GetInkCoverage method.
  • added GraphicsAlphaBits and TextAlphaBits properties in GhostscriptViewer and GhostscriptRasterizer so antialiasing can now be changed from the outside...

v.1.1.3.
  • added GhostscriptPdfInfo.GetInkCoverage function which has ability to return ink coverage for the CMYK inks, separately for each single page (for RGB colors, it does a silent conversion to CMYK color space internally). This function can be used to check if the pdf is grayscale or color.
  • fixed problem with opening MemoryStream EPS files which contains "EPS Preview Header" (reported by "Chanan Eli")
  • fixed problem with empty %%BoundingBox value when handling PostScript files (thanks to by "Shane_S")
  • fixed problem with rasterizing EPS files created with Adobe Illustrator (reported by "Chanan Eli")
  • fixed problem with retrieving exported function handle in DynamicNativeLibrary noticed on the Server 2012 R2 with large amount of memory (thanks to "antonyoni")
  • assembly is now signed with a strong name key (requested by "netmajor")

v.1.1.2.
  • fixed GhostscriptPipedOutput.Data property get accesor in order to prevent a race condition. (thanks to "Marc Klenotic").
  • added GhostscriptPipedOutput class as part of the Ghostscript.NET library.
  • fixed GhostscriptException error code text message resolving.
  • implemented better methods parameters checking and exception handling.
  • changed ImageMemoryHelper class from public to internal.
  • implemented opening files represented as MemoryStream from GhostscriptRasterizer and GhostscriptViewer. (that was some users request although there is no point of passing PDF as MemoryStream (or byte array) as it will anyway end up on the disk before it will be interpreted as PDF language, unlike the PostScript language, inherently requires random access to the file).

v.1.1.1.
  • fixed problem in GhostscriptRasterizer and GhostscriptViewer when MediaBox contains negative llx or lly values. (problem reported by "Prasenjit Das").
  • added GhostscriptPngDevice, a friendly output device class with all png devices related switches. (GhostscriptPngDevice supports: png16m, pngalpha, pnggray, png256, png16, pngmono, pngmonod).
  • added GhostscriptJpegDevice, a friendly output device class with all jpeg devices related switches. (GhostscriptJpegDevice supports: jpeg, jpeggray).
  • extended GhostscriptProcessor.StartProcessing method to support GhostscriptDevice base class as StartProcessing parameter.
  • for each constructor / method that requires GhostscriptVersionInfo parameter, now there is one more constructor / method available with a same functionality but without a need to pass GhostscriptVersionInfo parameter. This new constructors and methods automatically retrieves and use last installed Ghostscript version.
  • added new samples to the Ghostscript.NET.Samples project (AddWatermarkSample, ProcessorSample, DeviceUsageSample).

v.1.1.0.
  • added GhostscriptViewer state handling (SaveState, RestoreState)
  • GhostscriptRasterizer constructor is extended in order to support usage of the existing GhostscriptViewer instance.
  • fixed problem while using a 32-bit assembly with 32-bit version of Ghostscript on 64-bit Windows: It couldn't find a registry key of installed Ghostscript. Reported and fixed by "r0land".

v.1.0.9.
  • implemented EPS (Encapsulated PostScript) support for the GhostscriptViewer.
  • added GhostscriptRasterizer class which provides ability to easily export PDF pages, PostScript pages and EPS files to the System.Drawing.Image object in the memory. For each page different x and y dpi settings can be set.
  • fixed gsapi_stdin callback and it's value passing to the ghostscript library.
  • added ProgressiveUpdate property to the GhostscriptViewer class so progressive update can be controlled outside the library.

v.1.0.8.
  • implemented StopProcessing method in the GhostscriptProcessor class which allows us to terminate gsapiinitwith_args call in the multithread environment.
  • fixed GhostscriptViewer ZoomIn and ZoomOut problem on the systems where windows region and language settings has number decimal symbol set to comma.
  • added page navigation and zoom checker properties to the GhostscriptViewer class.
  • fixed problem in GhostscriptViewer class when trying to view PostScript files without DSC header.
  • GhostscriptProcessor.Process method name changed to StartProcessing.
Also check out Ghostscript Studio (http://ghostscriptstudio.codeplex.com/)

v.1.0.7.
  • implemented multi-page PostScript support for the GhostscriptViewer
  • included Microsoft.WinAny.Helper code files in order to have a single dll for the deployment
  • added Processing event to the GhostscriptProcessor class (with CurrentPage and TotalPages info)
  • added zoom-in and zoom-out functionality
  • fixed ImageMemoryHelper.Set24bppRgbImageColor function when stride size is not multiple of 3 bytes
  • fixed displayed page size
v.1.0.6.
  • implemented progressive display update while ghostscript is drawing / rasterizing, now a custom update interval can be set in GhostscriptViewer class.
  • fixed problem when using 64-bit ghostscript library where raster (stride) line size is not equal to 32-bit ghostscript library raster line size.
  • changed GhostscriptViewer class event logic.
  • changed Ghostscript.NET.Viewer application in order to show progressive update.
  • modified Ghostscript.NET.DisplayTest, now it uses GhostscriptViewer class with ability to interpret postscript and display standard input output messages.

Released: Ghostscript.NET v.1.1.5. (Mar 20, 2014)

$
0
0
v.1.1.5.
  • fixed the default cropping to the BoundingBox problem for the EPS file format in the GhostscriptViewer and GhostscriptRasterizer (reported by "midora").
  • exposed GhostscriptViewer.EPSClip and GhostscriptRasterizer.EPSClip properties with a default value set to true (affects only EPS format).
  • fixed problem with the paths that contains diacritics (reported by "GambitRicky")
  • added GhostscriptProcessor.Started and GhostscriptProcessor.Completed events (requested by "Ray H.").
  • all methods that works with MemoryStream are changed to use a generic Stream type (suggested by "midora").

v.1.1.4.
  • fixed problem with applying GraphicsAlphaBits and TextAlphaBits which improved antialiasing in GhostscriptViewer and GhostscriptRasterizer.
  • fixed problem with output through main stderr callback handler.
  • added support for MemoryStream in the GhostscriptPdfInfo.GetInkCoverage method.
  • added GraphicsAlphaBits and TextAlphaBits properties in GhostscriptViewer and GhostscriptRasterizer so antialiasing can now be changed from the outside...

v.1.1.3.
  • added GhostscriptPdfInfo.GetInkCoverage function which has ability to return ink coverage for the CMYK inks, separately for each single page (for RGB colors, it does a silent conversion to CMYK color space internally). This function can be used to check if the pdf is grayscale or color.
  • fixed problem with opening MemoryStream EPS files which contains "EPS Preview Header" (reported by "Chanan Eli")
  • fixed problem with empty %%BoundingBox value when handling PostScript files (thanks to by "Shane_S")
  • fixed problem with rasterizing EPS files created with Adobe Illustrator (reported by "Chanan Eli")
  • fixed problem with retrieving exported function handle in DynamicNativeLibrary noticed on the Server 2012 R2 with large amount of memory (thanks to "antonyoni")
  • assembly is now signed with a strong name key (requested by "netmajor")

v.1.1.2.
  • fixed GhostscriptPipedOutput.Data property get accesor in order to prevent a race condition. (thanks to "Marc Klenotic").
  • added GhostscriptPipedOutput class as part of the Ghostscript.NET library.
  • fixed GhostscriptException error code text message resolving.
  • implemented better methods parameters checking and exception handling.
  • changed ImageMemoryHelper class from public to internal.
  • implemented opening files represented as MemoryStream from GhostscriptRasterizer and GhostscriptViewer. (that was some users request although there is no point of passing PDF as MemoryStream (or byte array) as it will anyway end up on the disk before it will be interpreted as PDF language, unlike the PostScript language, inherently requires random access to the file).

v.1.1.1.
  • fixed problem in GhostscriptRasterizer and GhostscriptViewer when MediaBox contains negative llx or lly values. (problem reported by "Prasenjit Das").
  • added GhostscriptPngDevice, a friendly output device class with all png devices related switches. (GhostscriptPngDevice supports: png16m, pngalpha, pnggray, png256, png16, pngmono, pngmonod).
  • added GhostscriptJpegDevice, a friendly output device class with all jpeg devices related switches. (GhostscriptJpegDevice supports: jpeg, jpeggray).
  • extended GhostscriptProcessor.StartProcessing method to support GhostscriptDevice base class as StartProcessing parameter.
  • for each constructor / method that requires GhostscriptVersionInfo parameter, now there is one more constructor / method available with a same functionality but without a need to pass GhostscriptVersionInfo parameter. This new constructors and methods automatically retrieves and use last installed Ghostscript version.
  • added new samples to the Ghostscript.NET.Samples project (AddWatermarkSample, ProcessorSample, DeviceUsageSample).

v.1.1.0.
  • added GhostscriptViewer state handling (SaveState, RestoreState)
  • GhostscriptRasterizer constructor is extended in order to support usage of the existing GhostscriptViewer instance.
  • fixed problem while using a 32-bit assembly with 32-bit version of Ghostscript on 64-bit Windows: It couldn't find a registry key of installed Ghostscript. Reported and fixed by "r0land".

v.1.0.9.
  • implemented EPS (Encapsulated PostScript) support for the GhostscriptViewer.
  • added GhostscriptRasterizer class which provides ability to easily export PDF pages, PostScript pages and EPS files to the System.Drawing.Image object in the memory. For each page different x and y dpi settings can be set.
  • fixed gsapi_stdin callback and it's value passing to the ghostscript library.
  • added ProgressiveUpdate property to the GhostscriptViewer class so progressive update can be controlled outside the library.

v.1.0.8.
  • implemented StopProcessing method in the GhostscriptProcessor class which allows us to terminate gsapiinitwith_args call in the multithread environment.
  • fixed GhostscriptViewer ZoomIn and ZoomOut problem on the systems where windows region and language settings has number decimal symbol set to comma.
  • added page navigation and zoom checker properties to the GhostscriptViewer class.
  • fixed problem in GhostscriptViewer class when trying to view PostScript files without DSC header.
  • GhostscriptProcessor.Process method name changed to StartProcessing.
Also check out Ghostscript Studio (http://ghostscriptstudio.codeplex.com/)

v.1.0.7.
  • implemented multi-page PostScript support for the GhostscriptViewer
  • included Microsoft.WinAny.Helper code files in order to have a single dll for the deployment
  • added Processing event to the GhostscriptProcessor class (with CurrentPage and TotalPages info)
  • added zoom-in and zoom-out functionality
  • fixed ImageMemoryHelper.Set24bppRgbImageColor function when stride size is not multiple of 3 bytes
  • fixed displayed page size
v.1.0.6.
  • implemented progressive display update while ghostscript is drawing / rasterizing, now a custom update interval can be set in GhostscriptViewer class.
  • fixed problem when using 64-bit ghostscript library where raster (stride) line size is not equal to 32-bit ghostscript library raster line size.
  • changed GhostscriptViewer class event logic.
  • changed Ghostscript.NET.Viewer application in order to show progressive update.
  • modified Ghostscript.NET.DisplayTest, now it uses GhostscriptViewer class with ability to interpret postscript and display standard input output messages.

Updated Release: Ghostscript.NET v.1.1.5. (Mar 20, 2014)

$
0
0
v.1.1.5.
  • fixed the default cropping to the BoundingBox problem for the EPS file format in the GhostscriptViewer and GhostscriptRasterizer (reported by "midora").
  • exposed GhostscriptViewer.EPSClip and GhostscriptRasterizer.EPSClip properties with a default value set to true (affects only EPS format).
  • fixed problem with the paths that contains diacritics (reported by "GambitRicky")
  • added GhostscriptProcessor.Started and GhostscriptProcessor.Completed events (requested by "Ray H.").
  • all methods that works with MemoryStream are changed to use a generic Stream type (suggested by "midora").

v.1.1.4.
  • fixed problem with applying GraphicsAlphaBits and TextAlphaBits which improved antialiasing in GhostscriptViewer and GhostscriptRasterizer.
  • fixed problem with output through main stderr callback handler.
  • added support for MemoryStream in the GhostscriptPdfInfo.GetInkCoverage method.
  • added GraphicsAlphaBits and TextAlphaBits properties in GhostscriptViewer and GhostscriptRasterizer so antialiasing can now be changed from the outside...

v.1.1.3.
  • added GhostscriptPdfInfo.GetInkCoverage function which has ability to return ink coverage for the CMYK inks, separately for each single page (for RGB colors, it does a silent conversion to CMYK color space internally). This function can be used to check if the pdf is grayscale or color.
  • fixed problem with opening MemoryStream EPS files which contains "EPS Preview Header" (reported by "Chanan Eli")
  • fixed problem with empty %%BoundingBox value when handling PostScript files (thanks to by "Shane_S")
  • fixed problem with rasterizing EPS files created with Adobe Illustrator (reported by "Chanan Eli")
  • fixed problem with retrieving exported function handle in DynamicNativeLibrary noticed on the Server 2012 R2 with large amount of memory (thanks to "antonyoni")
  • assembly is now signed with a strong name key (requested by "netmajor")

v.1.1.2.
  • fixed GhostscriptPipedOutput.Data property get accesor in order to prevent a race condition. (thanks to "Marc Klenotic").
  • added GhostscriptPipedOutput class as part of the Ghostscript.NET library.
  • fixed GhostscriptException error code text message resolving.
  • implemented better methods parameters checking and exception handling.
  • changed ImageMemoryHelper class from public to internal.
  • implemented opening files represented as MemoryStream from GhostscriptRasterizer and GhostscriptViewer. (that was some users request although there is no point of passing PDF as MemoryStream (or byte array) as it will anyway end up on the disk before it will be interpreted as PDF language, unlike the PostScript language, inherently requires random access to the file).

v.1.1.1.
  • fixed problem in GhostscriptRasterizer and GhostscriptViewer when MediaBox contains negative llx or lly values. (problem reported by "Prasenjit Das").
  • added GhostscriptPngDevice, a friendly output device class with all png devices related switches. (GhostscriptPngDevice supports: png16m, pngalpha, pnggray, png256, png16, pngmono, pngmonod).
  • added GhostscriptJpegDevice, a friendly output device class with all jpeg devices related switches. (GhostscriptJpegDevice supports: jpeg, jpeggray).
  • extended GhostscriptProcessor.StartProcessing method to support GhostscriptDevice base class as StartProcessing parameter.
  • for each constructor / method that requires GhostscriptVersionInfo parameter, now there is one more constructor / method available with a same functionality but without a need to pass GhostscriptVersionInfo parameter. This new constructors and methods automatically retrieves and use last installed Ghostscript version.
  • added new samples to the Ghostscript.NET.Samples project (AddWatermarkSample, ProcessorSample, DeviceUsageSample).

v.1.1.0.
  • added GhostscriptViewer state handling (SaveState, RestoreState)
  • GhostscriptRasterizer constructor is extended in order to support usage of the existing GhostscriptViewer instance.
  • fixed problem while using a 32-bit assembly with 32-bit version of Ghostscript on 64-bit Windows: It couldn't find a registry key of installed Ghostscript. Reported and fixed by "r0land".

v.1.0.9.
  • implemented EPS (Encapsulated PostScript) support for the GhostscriptViewer.
  • added GhostscriptRasterizer class which provides ability to easily export PDF pages, PostScript pages and EPS files to the System.Drawing.Image object in the memory. For each page different x and y dpi settings can be set.
  • fixed gsapi_stdin callback and it's value passing to the ghostscript library.
  • added ProgressiveUpdate property to the GhostscriptViewer class so progressive update can be controlled outside the library.

v.1.0.8.
  • implemented StopProcessing method in the GhostscriptProcessor class which allows us to terminate gsapiinitwith_args call in the multithread environment.
  • fixed GhostscriptViewer ZoomIn and ZoomOut problem on the systems where windows region and language settings has number decimal symbol set to comma.
  • added page navigation and zoom checker properties to the GhostscriptViewer class.
  • fixed problem in GhostscriptViewer class when trying to view PostScript files without DSC header.
  • GhostscriptProcessor.Process method name changed to StartProcessing.
Also check out Ghostscript Studio (http://ghostscriptstudio.codeplex.com/)

v.1.0.7.
  • implemented multi-page PostScript support for the GhostscriptViewer
  • included Microsoft.WinAny.Helper code files in order to have a single dll for the deployment
  • added Processing event to the GhostscriptProcessor class (with CurrentPage and TotalPages info)
  • added zoom-in and zoom-out functionality
  • fixed ImageMemoryHelper.Set24bppRgbImageColor function when stride size is not multiple of 3 bytes
  • fixed displayed page size
v.1.0.6.
  • implemented progressive display update while ghostscript is drawing / rasterizing, now a custom update interval can be set in GhostscriptViewer class.
  • fixed problem when using 64-bit ghostscript library where raster (stride) line size is not equal to 32-bit ghostscript library raster line size.
  • changed GhostscriptViewer class event logic.
  • changed Ghostscript.NET.Viewer application in order to show progressive update.
  • modified Ghostscript.NET.DisplayTest, now it uses GhostscriptViewer class with ability to interpret postscript and display standard input output messages.

Closed Unassigned: SystemFormatException if PDF Filename contains diacritics [2129]

$
0
0
If the PDF file name contains diacritics e.g."Verträge.pdf" a format exception "Input string was not in a correct format." is thrown:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Ghostscript.NET.Viewer.GhostscriptViewerPdfFormatHandler.StdOutput(String message)
at Ghostscript.NET.Viewer.GhostscriptViewerStdIOHandler.StdOut(String output)
at Ghostscript.NET.GhostscriptStdIO.gs_std_out(IntPtr handle, IntPtr pointer, Int32 count)
at Ghostscript.NET.Interpreter.GhostscriptInterpreter.Run(String str)
at Ghostscript.NET.Viewer.GhostscriptViewerFormatHandler.Execute(String str)
at Ghostscript.NET.Viewer.GhostscriptViewerPdfFormatHandler.Open(String filePath)
at Ghostscript.NET.Viewer.GhostscriptViewer.Open()
at Ghostscript.NET.Viewer.GhostscriptViewer.Open(String path, GhostscriptVersionInfo versionInfo, Boolean dllFromMemory)

I checked various diacritics like ćšäö and the exception is always thrown.
As a workaround the Open(MemoryStream stream, GhostscriptVersionInfo versionInfo, bool dllFromMemory) overload works like a charm
Comments: Fixed in current release (v.1.1.5)

Closed Unassigned: EPSCrop [2130]

$
0
0
I'm not able to activate -dEPSCrop with the rasterizer.
It works with a custom switch in GhostscriptPngDevice but temporary saving to a file is a little bit slow.
Any idea?
Cropping to the BoundingBox is the normal case if you are using .eps files.
Comments: Fixed in current release (v.1.1.5)

New Post: some PDFs cannot be converted

$
0
0
Hi ibram84,

The problem for the second PDF sample ("Sample #2") is a bad PDF file (not generated properly).

That PDF reports this:
Error: /rangecheck in --setdash--
Operand stack:
   --dict:6/7(L)--   --dict:6/7(L)--   --dict:6/7(L)--   10.0   --nostringval--   0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   false   1   %stopped_push   1932   1   3   %oparray_pop   1931   1   3   %oparray_pop   1915   1   3   %oparray_pop   1803   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   1804   6   8   %oparray_pop
Dictionary stack:
   --dict:1186/1684(ro)(G)--   --dict:1/20(G)--   --dict:119/200(L)--   --dict:113/127(ro)(G)--   --dict:292/300(ro)(G)--   --dict:27/32(L)--   --dict:6/8(L)--   --dict:28/40(L)--
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.

NuGet: PM> Install-Package Ghostscript.NET

Used in the Ghostscript Studio (Ghostscript IDE)

                                                       

 

Contains:

  • GhostscriptViewer - View PDF, EPS or multi-page PostScript files on the screen (supports zoom and progressive update).
  • 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 result to disk.
  • allows you to run multiple Ghostscript instances simultaneously within a single process.
  • compatible with 32-bit and 64-bit Ghostscript native library.

 

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 

Example of direct postscript rasterizing via Ghostscript.NET.

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

 

Website counter

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.

NuGet: PM> Install-Package Ghostscript.NET

Used in the Ghostscript Studio (Ghostscript IDE)

                                                       

 

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.

 

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 

Example of direct postscript rasterizing via Ghostscript.NET.

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

 

Website counter

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.

NuGet: PM> Install-Package Ghostscript.NET

Used in the Ghostscript Studio (Ghostscript IDE)

                                                       

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.

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 

Example of direct postscript rasterizing via Ghostscript.NET.

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

 

Website counter

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.

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 

Example of direct postscript rasterizing via Ghostscript.NET.

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

 

Website counter

Viewing all 393 articles
Browse latest View live


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