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

Capture stdout from ghostscript #11

Open
mhirsch opened this issue Jun 22, 2021 · 3 comments
Open

Capture stdout from ghostscript #11

mhirsch opened this issue Jun 22, 2021 · 3 comments

Comments

@mhirsch
Copy link

mhirsch commented Jun 22, 2021

Is there an easy way to capture stdout from the ghostscript process? Some drivers, for example tiffsep produce meaningful output in stdout.

Thanks

@rmeja
Copy link
Collaborator

rmeja commented Jun 22, 2021

Maybe I could put the the stdout in the second parameter of the callback function (function (codeError, stdout)) ? What do you think ?

@mhirsch
Copy link
Author

mhirsch commented Jun 22, 2021

It seems like your exec function most closely follows the semantics of node's child_process.execFile in that it returns all results after the process exits. I would follow the same pattern that child_process does here. Thanks for considering this!

@rmeja
Copy link
Collaborator

rmeja commented Jul 5, 2021

It will be more complicated than expected to do this. The gsapi_set_stdio function takes as parameter a function pointer which forces me from the instance of my class to use a static method of my class and not a method of my object. 🤔

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

2 participants