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

Print pdf to printer from Web Service #13

Closed
RobFra opened this issue Sep 25, 2015 · 4 comments
Closed

Print pdf to printer from Web Service #13

RobFra opened this issue Sep 25, 2015 · 4 comments

Comments

@RobFra
Copy link

RobFra commented Sep 25, 2015

Hello,
I'm trying to print a pdf file to printer directly from a Web service.
It works under IIS Express but in deployment machine it doesn't work.
Gives:
An error occured when call to 'gsapi_new_instance' is made: -100

The code is:

Using processor As New GhostscriptProcessor()
            Dim switches As New List(Of String)()
            switches.Add("-empty")
            switches.Add("-dPrinted")
            switches.Add("-dBATCH")
            switches.Add("-dNOPAUSE")
            switches.Add("-dNOSAFER")
            switches.Add("-dNumCopies=1")
            switches.Add("-sDEVICE=mswinpr2")
            switches.Add(Convert.ToString("-sOutputFile=%printer%") & printerName)
            switches.Add("-f")
            switches.Add(filename)

            processor.StartProcessing(switches.ToArray(), Nothing)
        End Using

IIS is running 64 bit.
ApplicationPool has an Administrator user identity.

@jhabjan
Copy link
Contributor

jhabjan commented Oct 1, 2015

It looks like permission issue. Try to change your Application Pool to use a User Identity.

@RobFra
Copy link
Author

RobFra commented Oct 2, 2015

As I've wrote, I've already tried with a user thas has administrator rights.

@NabilKem
Copy link

Hi, did you find a solution to this error ??

Thanks

@jhabjan jhabjan closed this as completed Dec 13, 2016
@tarcisiomartins
Copy link

I have the same problem.

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

4 participants