Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pdf-image

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf-image - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

6

index.js

@@ -18,2 +18,3 @@ // node-pdf

this.setConvertExtension(options.convertExtension);
this.useGM = options.graphicsMagick || false;

@@ -77,6 +78,7 @@ // TODO: make out dir customizable

var pdfFilePath = this.pdfFilePath;
var outputImagePath = "\""+this.getOutputImagePathForPage(pageNumber)+"\"";
var outputImagePath = this.getOutputImagePathForPage(pageNumber);
var convertOptionsString = this.constructConvertOptions();
return util.format(
"convert %s'%s[%d]' '%s'",
"%s %s'%s[%d]' '%s'",
this.useGM ? "gm convert" : "convert",
convertOptionsString ? convertOptionsString + " " : "",

@@ -83,0 +85,0 @@ pdfFilePath, pageNumber, outputImagePath

{
"name": "pdf-image",
"version": "1.0.3",
"version": "1.0.4",
"main": "index.js",

@@ -16,3 +16,9 @@ "repository": {

"chai": "~1.9.2"
},
"devDependencies": {
"mocha": "~2.3.4"
},
"scripts": {
"test": "mocha tests/*"
}
}

@@ -31,5 +31,11 @@ var assert = require("assert");

expect(pdfImage.constructConvertCommandForPage(1))
.equal("convert '/tmp/test.pdf[1]' /tmp/test-1.png");
.equal("convert '/tmp/test.pdf[1]' '/tmp/test-1.png'");
});
it("should use gm when you ask it to", function () {
pdfImage = new PDFImage(pdfPath, {graphicsMagick: true})
expect(pdfImage.constructConvertCommandForPage(1))
.equal("gm convert '/tmp/test.pdf[1]' '/tmp/test-1.png'");
});
// TODO: Do page updating test

@@ -36,0 +42,0 @@ it("should convert PDF's page to a file with the default extension", function () {

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