Socket
Socket
Sign inDemoInstall

pdf-to-png-converter

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf-to-png-converter - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

out/normalize.path.d.ts

1

out/compare.png.d.ts

@@ -1,4 +0,3 @@

/// <reference types="node" />
import { ComparePngOptions } from 'png-visual-compare';
export declare function comparePNG(actualFilePathOrBuffer: string | Buffer, expectedFilePath: string, opts?: ComparePngOptions): number;
//# sourceMappingURL=compare.png.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.comparePNG = void 0;
exports.comparePNG = comparePNG;
const node_fs_1 = require("node:fs");

@@ -22,3 +22,2 @@ const node_path_1 = require("node:path");

}
exports.comparePNG = comparePNG;
//# sourceMappingURL=compare.png.js.map

@@ -5,2 +5,4 @@ import { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api';

export declare const DOCUMENT_INIT_PARAMS_DEFAULTS: DocumentInitParameters;
export declare const STANDARD_FONTS: string[];
export declare const STANDARD_CMAPS: string[];
//# sourceMappingURL=const.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DOCUMENT_INIT_PARAMS_DEFAULTS = exports.PDF_TO_PNG_OPTIONS_DEFAULTS = void 0;
const node_path_1 = require("node:path");
exports.STANDARD_CMAPS = exports.STANDARD_FONTS = exports.DOCUMENT_INIT_PARAMS_DEFAULTS = exports.PDF_TO_PNG_OPTIONS_DEFAULTS = void 0;
const normalize_path_1 = require("./normalize.path");
exports.PDF_TO_PNG_OPTIONS_DEFAULTS = {

@@ -15,6 +15,195 @@ viewportScale: 1,

exports.DOCUMENT_INIT_PARAMS_DEFAULTS = {
cMapUrl: (0, node_path_1.join)(__dirname, '../../node_modules/pdfjs-dist/cmaps/'),
cMapUrl: (0, normalize_path_1.normalizePath)('./node_modules/pdfjs-dist/cmaps/'),
cMapPacked: true,
standardFontDataUrl: (0, node_path_1.join)(__dirname, '../../node_modules/pdfjs-dist/standard_fonts/'),
standardFontDataUrl: (0, normalize_path_1.normalizePath)('./node_modules/pdfjs-dist/standard_fonts/'),
};
exports.STANDARD_FONTS = [
'FoxitDingbats.pfb',
'FoxitFixed.pfb',
'FoxitFixedBold.pfb',
'FoxitFixedBoldItalic.pfb',
'FoxitFixedItalic.pfb',
'FoxitSerif.pfb',
'FoxitSerifBold.pfb',
'FoxitSerifBoldItalic.pfb',
'FoxitSerifItalic.pfb',
'FoxitSymbol.pfb',
'LICENSE_FOXIT',
'LICENSE_LIBERATION',
'LiberationSans-Bold.ttf',
'LiberationSans-BoldItalic.ttf',
'LiberationSans-Italic.ttf',
'LiberationSans-Regular.ttf',
];
exports.STANDARD_CMAPS = [
'78-EUC-H.bcmap',
'78-EUC-V.bcmap',
'78-H.bcmap',
'78-RKSJ-H.bcmap',
'78-RKSJ-V.bcmap',
'78-V.bcmap',
'78ms-RKSJ-H.bcmap',
'78ms-RKSJ-V.bcmap',
'83pv-RKSJ-H.bcmap',
'90ms-RKSJ-H.bcmap',
'90ms-RKSJ-V.bcmap',
'90msp-RKSJ-H.bcmap',
'90msp-RKSJ-V.bcmap',
'90pv-RKSJ-H.bcmap',
'90pv-RKSJ-V.bcmap',
'Add-H.bcmap',
'Add-RKSJ-H.bcmap',
'Add-RKSJ-V.bcmap',
'Add-V.bcmap',
'Adobe-CNS1-0.bcmap',
'Adobe-CNS1-1.bcmap',
'Adobe-CNS1-2.bcmap',
'Adobe-CNS1-3.bcmap',
'Adobe-CNS1-4.bcmap',
'Adobe-CNS1-5.bcmap',
'Adobe-CNS1-6.bcmap',
'Adobe-CNS1-UCS2.bcmap',
'Adobe-GB1-0.bcmap',
'Adobe-GB1-1.bcmap',
'Adobe-GB1-2.bcmap',
'Adobe-GB1-3.bcmap',
'Adobe-GB1-4.bcmap',
'Adobe-GB1-5.bcmap',
'Adobe-GB1-UCS2.bcmap',
'Adobe-Japan1-0.bcmap',
'Adobe-Japan1-1.bcmap',
'Adobe-Japan1-2.bcmap',
'Adobe-Japan1-3.bcmap',
'Adobe-Japan1-4.bcmap',
'Adobe-Japan1-5.bcmap',
'Adobe-Japan1-6.bcmap',
'Adobe-Japan1-UCS2.bcmap',
'Adobe-Korea1-0.bcmap',
'Adobe-Korea1-1.bcmap',
'Adobe-Korea1-2.bcmap',
'Adobe-Korea1-UCS2.bcmap',
'B5-H.bcmap',
'B5-V.bcmap',
'B5pc-H.bcmap',
'B5pc-V.bcmap',
'CNS-EUC-H.bcmap',
'CNS-EUC-V.bcmap',
'CNS1-H.bcmap',
'CNS1-V.bcmap',
'CNS2-H.bcmap',
'CNS2-V.bcmap',
'ETHK-B5-H.bcmap',
'ETHK-B5-V.bcmap',
'ETen-B5-H.bcmap',
'ETen-B5-V.bcmap',
'ETenms-B5-H.bcmap',
'ETenms-B5-V.bcmap',
'EUC-H.bcmap',
'EUC-V.bcmap',
'Ext-H.bcmap',
'Ext-RKSJ-H.bcmap',
'Ext-RKSJ-V.bcmap',
'Ext-V.bcmap',
'GB-EUC-H.bcmap',
'GB-EUC-V.bcmap',
'GB-H.bcmap',
'GB-V.bcmap',
'GBK-EUC-H.bcmap',
'GBK-EUC-V.bcmap',
'GBK2K-H.bcmap',
'GBK2K-V.bcmap',
'GBKp-EUC-H.bcmap',
'GBKp-EUC-V.bcmap',
'GBT-EUC-H.bcmap',
'GBT-EUC-V.bcmap',
'GBT-H.bcmap',
'GBT-V.bcmap',
'GBTpc-EUC-H.bcmap',
'GBTpc-EUC-V.bcmap',
'GBpc-EUC-H.bcmap',
'GBpc-EUC-V.bcmap',
'H.bcmap',
'HKdla-B5-H.bcmap',
'HKdla-B5-V.bcmap',
'HKdlb-B5-H.bcmap',
'HKdlb-B5-V.bcmap',
'HKgccs-B5-H.bcmap',
'HKgccs-B5-V.bcmap',
'HKm314-B5-H.bcmap',
'HKm314-B5-V.bcmap',
'HKm471-B5-H.bcmap',
'HKm471-B5-V.bcmap',
'HKscs-B5-H.bcmap',
'HKscs-B5-V.bcmap',
'Hankaku.bcmap',
'Hiragana.bcmap',
'KSC-EUC-H.bcmap',
'KSC-EUC-V.bcmap',
'KSC-H.bcmap',
'KSC-Johab-H.bcmap',
'KSC-Johab-V.bcmap',
'KSC-V.bcmap',
'KSCms-UHC-H.bcmap',
'KSCms-UHC-HW-H.bcmap',
'KSCms-UHC-HW-V.bcmap',
'KSCms-UHC-V.bcmap',
'KSCpc-EUC-H.bcmap',
'KSCpc-EUC-V.bcmap',
'Katakana.bcmap',
'LICENSE',
'NWP-H.bcmap',
'NWP-V.bcmap',
'RKSJ-H.bcmap',
'RKSJ-V.bcmap',
'Roman.bcmap',
'UniCNS-UCS2-H.bcmap',
'UniCNS-UCS2-V.bcmap',
'UniCNS-UTF16-H.bcmap',
'UniCNS-UTF16-V.bcmap',
'UniCNS-UTF32-H.bcmap',
'UniCNS-UTF32-V.bcmap',
'UniCNS-UTF8-H.bcmap',
'UniCNS-UTF8-V.bcmap',
'UniGB-UCS2-H.bcmap',
'UniGB-UCS2-V.bcmap',
'UniGB-UTF16-H.bcmap',
'UniGB-UTF16-V.bcmap',
'UniGB-UTF32-H.bcmap',
'UniGB-UTF32-V.bcmap',
'UniGB-UTF8-H.bcmap',
'UniGB-UTF8-V.bcmap',
'UniJIS-UCS2-H.bcmap',
'UniJIS-UCS2-HW-H.bcmap',
'UniJIS-UCS2-HW-V.bcmap',
'UniJIS-UCS2-V.bcmap',
'UniJIS-UTF16-H.bcmap',
'UniJIS-UTF16-V.bcmap',
'UniJIS-UTF32-H.bcmap',
'UniJIS-UTF32-V.bcmap',
'UniJIS-UTF8-H.bcmap',
'UniJIS-UTF8-V.bcmap',
'UniJIS2004-UTF16-H.bcmap',
'UniJIS2004-UTF16-V.bcmap',
'UniJIS2004-UTF32-H.bcmap',
'UniJIS2004-UTF32-V.bcmap',
'UniJIS2004-UTF8-H.bcmap',
'UniJIS2004-UTF8-V.bcmap',
'UniJISPro-UCS2-HW-V.bcmap',
'UniJISPro-UCS2-V.bcmap',
'UniJISPro-UTF8-V.bcmap',
'UniJISX0213-UTF32-H.bcmap',
'UniJISX0213-UTF32-V.bcmap',
'UniJISX02132004-UTF32-H.bcmap',
'UniJISX02132004-UTF32-V.bcmap',
'UniKS-UCS2-H.bcmap',
'UniKS-UCS2-V.bcmap',
'UniKS-UTF16-H.bcmap',
'UniKS-UTF16-V.bcmap',
'UniKS-UTF32-H.bcmap',
'UniKS-UTF32-V.bcmap',
'UniKS-UTF8-H.bcmap',
'UniKS-UTF8-V.bcmap',
'V.bcmap',
'WP-Symbol.bcmap',
];
//# sourceMappingURL=const.js.map

@@ -12,3 +12,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.pdfToPng = void 0;
exports.pdfToPng = pdfToPng;
const node_fs_1 = require("node:fs");

@@ -21,3 +21,3 @@ const node_path_1 = require("node:path");

return __awaiter(this, void 0, void 0, function* () {
const pdf = yield import('pdfjs-dist/legacy/build/pdf.mjs');
const { getDocument } = yield import('pdfjs-dist/legacy/build/pdf.mjs');
const isBuffer = Buffer.isBuffer(pdfFilePathOrBuffer);

@@ -31,3 +31,3 @@ const pdfFileBuffer = isBuffer

pdfDocInitParams.canvasFactory = canvasFactory;
const pdfDocument = yield pdf.getDocument(pdfDocInitParams).promise;
const pdfDocument = yield getDocument(pdfDocInitParams).promise;
const targetedPageNumbers = (props === null || props === void 0 ? void 0 : props.pagesToProcess) !== undefined

@@ -92,3 +92,2 @@ ? props.pagesToProcess

}
exports.pdfToPng = pdfToPng;
//# sourceMappingURL=pdf.to.png.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.propsToPdfDocInitParams = void 0;
exports.propsToPdfDocInitParams = propsToPdfDocInitParams;
const const_1 = require("./const");

@@ -19,3 +19,2 @@ const verbosity_level_1 = require("./types/verbosity.level");

}
exports.propsToPdfDocInitParams = propsToPdfDocInitParams;
//# sourceMappingURL=props.to.pdf.doc.init.params.js.map

@@ -1,2 +0,1 @@

/// <reference types="node" />
export type PngPageOutput = {

@@ -3,0 +2,0 @@ pageNumber: number;

{
"name": "pdf-to-png-converter",
"version": "3.2.0",
"version": "3.3.0",
"description": "Node.js utility to convert PDF file/buffer pages to PNG files/buffers with no native dependencies.",

@@ -29,4 +29,4 @@ "keywords": [

"prebuild": "npm run clean",
"build": "tsc --pretty --project tsconfig.prod.json",
"build:test": "tsc --pretty --project tsconfig.test.json",
"build": "tsc --pretty --project tsconfig.prod.json",
"build:test": "tsc --pretty --noEmit --project tsconfig.test.json",
"clean": "npx rimraf ./out ./coverage ./test-results",

@@ -36,9 +36,9 @@ "docker:build": "docker build --compress -t test-pdf-to-png-converter .",

"docker:run": "docker run --rm -it -v $PWD/test-results:/usr/pkg/test-results test-pdf-to-png-converter",
"predocker:test": "tsc --project tsconfig.test.json",
"docker:test": "mocha",
"predocker:test": "npm run build:test",
"docker:test": "vitest run",
"license-checker": "npx license-checker --production --onlyAllow 'MIT; MIT OR X11; BSD; ISC; Apache-2.0; Unlicense'",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"pretest": "npm run clean && npm run build:test",
"test": "mocha",
"pretest": "npm run clean",
"test": "vitest run --coverage",
"test:docker": "npm run docker:build && npm run docker:run"

@@ -48,21 +48,18 @@ },

"canvas": "^2.11.2",
"pdfjs-dist": "^4.0.379"
"pdfjs-dist": "^4.5.136"
},
"devDependencies": {
"@types/chai": "^4.3.12",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.27",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"chai": "^4.4.1",
"chai-as-promised": "^7.1.1",
"eslint": "^8.57.0",
"mocha": "^10.3.0",
"png-visual-compare": "^1.2.0",
"@types/node": "^20.16.2",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"@vitest/coverage-v8": "^2.0.5",
"eslint": "^9.9.1",
"png-visual-compare": "^1.2.3",
"ts-node": "^10.9.2",
"typescript": "^5.4.2"
"typescript": "^5.5.4",
"vitest": "^2.0.5"
},
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc