Comparing version 1.3.0 to 1.3.1
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FSUtils = void 0; | ||
exports.addBackslashForSpaces = exports.FSUtils = void 0; | ||
const fs_1 = __importDefault(require("fs")); | ||
@@ -37,1 +37,6 @@ class FSUtils { | ||
exports.FSUtils = FSUtils; | ||
function addBackslashForSpaces(inputString) { | ||
var stringWithBackslash = inputString.replace(/ /g, '\\ '); | ||
return stringWithBackslash; | ||
} | ||
exports.addBackslashForSpaces = addBackslashForSpaces; |
@@ -27,2 +27,3 @@ "use strict"; | ||
} | ||
pdfPath = (0, utils_1.addBackslashForSpaces)(pdfPath); | ||
const infoObject = { pdfPath }; | ||
@@ -61,2 +62,3 @@ const imgExtension = outputImgExtension || 'png'; | ||
const outputImgPath = path_1.default.join(outputImgDir, outputImgName); | ||
pdfPath = (0, utils_1.addBackslashForSpaces)(pdfPath); | ||
if (!(await utils_1.FSUtils.exists(outputImgPath))) | ||
@@ -99,4 +101,4 @@ await utils_1.FSUtils.mkdir(outputImgPath); | ||
} | ||
exports.default = ImageMagick; | ||
ImageMagick.quality = 100; | ||
ImageMagick.density = 200; | ||
exports.default = ImageMagick; |
@@ -9,2 +9,3 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const utils_1 = require("../lib/utils"); | ||
/** | ||
@@ -23,2 +24,3 @@ * @class {Poppler} | ||
const outputImgPath = path_1.default.join(outputImgDir, outputImgName); | ||
pdfPath = (0, utils_1.addBackslashForSpaces)(pdfPath); | ||
if (!fs_1.default.existsSync(outputImgPath)) { | ||
@@ -25,0 +27,0 @@ fs_1.default.mkdirSync(outputImgPath); |
{ | ||
"name": "pdf-images", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "The pf-images library aims to simplify pdf-conversion by using poppler / pdfImages & imageMagick to convert pdfs to images.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -30,1 +30,6 @@ import fs from 'fs'; | ||
} | ||
export function addBackslashForSpaces(inputString: string) { | ||
var stringWithBackslash = inputString.replace(/ /g, '\\ '); | ||
return stringWithBackslash; | ||
} |
const { execFileSync, exec } = require('child_process'); | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { FSUtils } from '../lib/utils'; | ||
import { FSUtils, addBackslashForSpaces } from '../lib/utils'; | ||
@@ -25,2 +25,3 @@ /** | ||
} | ||
pdfPath = addBackslashForSpaces(pdfPath); | ||
const infoObject: any = { pdfPath }; | ||
@@ -65,2 +66,3 @@ const imgExtension = outputImgExtension || 'png'; | ||
const outputImgPath = path.join(outputImgDir, outputImgName); | ||
pdfPath = addBackslashForSpaces(pdfPath); | ||
if (!(await FSUtils.exists(outputImgPath))) await FSUtils.mkdir(outputImgPath); | ||
@@ -67,0 +69,0 @@ const imgExtension = outputImgExtension || 'png'; |
const { execFileSync } = require('child_process'); | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { addBackslashForSpaces } from '../lib/utils'; | ||
@@ -18,2 +19,3 @@ /** | ||
const outputImgPath = path.join(outputImgDir, outputImgName); | ||
pdfPath = addBackslashForSpaces(pdfPath); | ||
if (!fs.existsSync(outputImgPath)) { | ||
@@ -20,0 +22,0 @@ fs.mkdirSync(outputImgPath); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99394
419