diff --git a/src/index.js b/src/index.js index 58a545e5..10acdad3 100644 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,7 @@ const path = require('path'); const { execFile } = require('child_process'); const util = require('util'); -const execFileSync = util.promisify(execFile); +const execFileAsync = util.promisify(execFile); const platform = os.platform(); /** @@ -110,7 +110,7 @@ class Poppler { args.push(fileToAttach); args.push(outputFile); - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdfattach'), args ); @@ -164,7 +164,7 @@ class Poppler { const args = await parseOptions(acceptedOptions, options); args.push(file); - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdfdetach'), args ); @@ -203,7 +203,7 @@ class Poppler { const args = await parseOptions(acceptedOptions, options); args.push(file); - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdffonts'), args ); @@ -262,7 +262,7 @@ class Poppler { args.push(outputPrefix); } - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdfimages'), args ); @@ -327,7 +327,7 @@ class Poppler { const args = await parseOptions(acceptedOptions, options); args.push(file); - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdfinfo'), args ); @@ -367,7 +367,7 @@ class Poppler { args.push(file); args.push(outputPattern); - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdfseparate'), args ); @@ -527,7 +527,7 @@ class Poppler { } else { args.push('-'); } - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdftocairo'), args ); @@ -604,7 +604,7 @@ class Poppler { const args = await parseOptions(acceptedOptions, options); args.push(file); - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdftohtml'), args ); @@ -718,7 +718,7 @@ class Poppler { args.push(file); args.push(outputPath); - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdftoppm'), args ); @@ -878,7 +878,7 @@ class Poppler { args.push('-'); } - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdftops'), args ); @@ -971,7 +971,7 @@ class Poppler { args.push('-'); } - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdftotext'), args ); @@ -1005,7 +1005,7 @@ class Poppler { }); args.push(outputFile); - const { stdout } = await execFileSync( + const { stdout } = await execFileAsync( path.join(this.popplerPath, 'pdfunite'), args );