From d3671818fc69f5a587eed37ce088cdf77c78f768 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Thu, 20 Apr 2023 17:38:58 -0500 Subject: [PATCH] scanservjs: Add config overrides for PIXMA G7020 The Canon PIXMA G7020 reports the supported dimensions of the flatbed, but its automatic document feeder supports larger paper sizes. Fortunately, *scanserv-js* provides a (somewhat kludgey) mechanism to override the reported settings with more appropriate values. --- scanservjs/config.local.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scanservjs/config.local.js b/scanservjs/config.local.js index 808cbfb..adef403 100644 --- a/scanservjs/config.local.js +++ b/scanservjs/config.local.js @@ -73,5 +73,16 @@ module.exports = { if (fileInfo.name.endsWith('.pdf')) { await paperless_send(fileInfo.fullname); } + }, + + afterDevices(devices) { + devices + .filter(d => d.id == 'escl:https://172.30.0.234:443') + .forEach(device => { + device.name = 'Canon PIXMA G7020'; + device.features['-x'].limits = [0, 216]; + device.features['-y'].limits = [0, 432]; + device.features['-y'].default = 279.4; + }); } }