Skip to content

Commit

Permalink
Merge pull request #2 from tgrundle/hpj4680-fixes-1
Browse files Browse the repository at this point in the history
Minors changes to support HP Office Jet 4680j
  • Loading branch information
sbs20 authored Jan 2, 2017
2 parents 46c3943 + 1c5dc71 commit d0dc6c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion classes/Api.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = function () {
brightness: req.brightness,
contrast: req.contrast,
outputFilepath: Config.PreviewDirectory + 'preview.tif',
resolution: 50
resolution: Config.PreviewResolution
});

var scanner = new Scanimage();
Expand Down
4 changes: 3 additions & 1 deletion classes/Config.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ module.exports = {
OutputDirectory: './data/output/',
PreviewDirectory: './data/preview/',
MaximumScanWidthInMm: 215,
MaximumScanHeightInMm: 297
MaximumScanHeightInMm: 297,
PreviewResolution: 100,
SupportsDepth: false;
};
7 changes: 5 additions & 2 deletions classes/Scanimage.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ module.exports = function () {
var commandLine = function (scanRequest) {
var cmd = Config.Scanimage;
cmd += ' --mode ' + scanRequest.mode;
cmd += ' --depth ' + scanRequest.depth;

if (Config.SupportsDepth) {
cmd += ' --depth ' + scanRequest.depth;
}
cmd += ' --resolution ' + scanRequest.resolution;
cmd += ' -l ' + scanRequest.left;
cmd += ' -t ' + scanRequest.top;
Expand Down Expand Up @@ -65,4 +68,4 @@ module.exports = function () {
return Q.reject(response);
}
}
};
};

0 comments on commit d0dc6c2

Please sign in to comment.