Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing an Issue "An error occured when call to 'gsapi_init_with_args' is made: -100" While converting ps to PNG #53

Closed
Sureshgoudb opened this issue Aug 15, 2018 · 2 comments

Comments

@Sureshgoudb
Copy link

Sureshgoudb commented Aug 15, 2018

        GhostscriptPipedOutput gsPipedOutput = new GhostscriptPipedOutput();
        string outputPipeHandle = "%handle%" + int.Parse(gsPipedOutput.ClientHandle).ToString("X2");
        using (GhostscriptProcessor processor = new GhostscriptProcessor())
        {
            List<string> switches = new List<string>();
            switches.Add("-empty");
            switches.Add("-dQUIET");
            switches.Add("-dSAFER");
            switches.Add("-dBATCH");
            switches.Add("-dNOPAUSE");
            switches.Add("-dNOPROMPT");
            switches.Add("-dNumCopies=1");
            switches.Add("-sDEVICE=pngalpha");
            switches.Add("-o" + outputPipeHandle);
            switches.Add("-sOutputFile=C:\\Converted.png");
            switches.Add(PSFile);
            processor.StartProcessing(switches.ToArray(), null);
          }
@Luke-Meyer
Copy link

What version of .Net were you using when you encountered this? I am seeing similar issues on .Net Core 2.1 and am wondering if targeting the .Net framework (4.6.1 or something similar) would fix it.

@jhabjan
Copy link
Contributor

jhabjan commented Feb 4, 2021

Fixed in today's v.1.2.2. release.

@jhabjan jhabjan closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants