pdf2htmlEX icon indicating copy to clipboard operation
pdf2htmlEX copied to clipboard

running this image from nodejs program.

Open raghuprathap opened this issue 6 years ago • 1 comments

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.

raghuprathap avatar Jun 04 '18 06:06 raghuprathap

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

JonKrone avatar Jul 14 '18 21:07 JonKrone