Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

running this image from nodejs program. #774

Open
raghuprathap opened this issue Jun 4, 2018 · 1 comment
Open

running this image from nodejs program. #774

raghuprathap opened this issue Jun 4, 2018 · 1 comment

Comments

@raghuprathap
Copy link

Hi

Can you give us some examples how to run this image from node js program just like we run from command prompt.

Thanks in advance.

@JonKrone
Copy link

Hey @raghuprathap,

I'm just browsing this repo but wanted to comment that you can use any CLI tool from Node with the built-in child_process module. This is an important thing to know doing Node development.

quick demo:

const { exec, /* or spawn */ } = require('child_process')
exec('pdf2htmlEX [options] <input-filename> [<output-filename>]', callback)

Longer explanations:
https://stackoverflow.com/questions/20643470/execute-a-command-line-binary-with-node-js
https://nodejs.org/api/child_process.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants