manuc66 / node-hp-scan-to

Allow to send scan from device to computer for some HP All-in-One Printers - Scan to computer
https://manuc66.github.io/node-hp-scan-to/
MIT License
163 stars 25 forks source link

PDF documents are not created anymore #945

Closed quench2259 closed 4 months ago

quench2259 commented 4 months ago

After latest update, the PDFs are not generated anymore in the temp and target folder.

Device: HP 6970

Command line or Docker : Docker within synology container app (was working until today),

Describe what is happening When performing scan to node-hp-scan-to on printer, PDFs are not created anymore.

Please attach the output with debug (-D switch, see documentation)

2024/07/17 12:03:50 | stdout | Start listening for new ScanEvent
-- | -- | --
2024/07/17 12:03:50 | stdout | Waiting scan event for: /WalkupScanToComp/WalkupScanToCompDestinations/1c85512e-b8a5-1f08-9de9-c8d9d2c6622a
2024/07/17 12:03:50 | stdout | Using: node-hp-scan-to
2024/07/17 12:03:50 | stdout | Re-using existing destination: node-hp-scan-to - /WalkupScanToComp/WalkupScanToCompDestinations/1c85512e-b8a5-1f08-9de9-c8d9d2c6622a
2024/07/17 12:03:50 | stdout | Host destinations fetched: MININT-LC7E735, node-hp-scan-to
2024/07/17 12:03:50 | stdout | Running iteration: 2 - errorCount: 0
2024/07/17 12:03:49 | stdout | - page   1 - 1700x2348
2024/07/17 12:03:49 | stdout | The following page(s) have been rendered inside '/tmp/scan-to-pcIoMppj/scan_17.07.2024_12:03:22.pdf':
2024/07/17 12:03:49 | stdout | Scan of page(s) completed totalPages: 1:
2024/07/17 12:03:49 | stdout | Job state: Completed, totalPages: 1:
2024/07/17 12:03:49 | stdout | Page downloaded to: /tmp/scan-to-pcIoMppj/scan_17.07.2024_12:03:30.jpg
2024/07/17 12:03:30 | stdout | Ready to download page job page 1 at: /Scan/Jobs/27/Pages/1
2024/07/17 12:03:23 | stdout | New job created: http://192.168.178.32:8080/Jobs/JobList/27
2024/07/17 12:03:22 | stdout | Afd is : Loaded
2024/07/17 12:03:22 | stdout | ScanPlexMode is : Simplex
2024/07/17 12:03:22 | stdout | Scan will be converted to pdf, using /tmp/scan-to-pcIoMppj as temp scan output directory for individual pages
2024/07/17 12:03:22 | stdout | Selected shortcut: SavePDF
2024/07/17 12:03:21 | stdout | Waiting user input: 1/50
2024/07/17 12:03:21 | stdout | Scan event captured, saving scan #0
2024/07/17 12:02:43 | stdout | Start listening for new ScanEvent
2024/07/17 12:02:43 | stdout | Waiting scan event for: /WalkupScanToComp/WalkupScanToCompDestinations/1c85512e-b8a5-1f08-9de9-c8d9d2c6622a
2024/07/17 12:02:43 | stdout | Using: node-hp-scan-to
2024/07/17 12:02:43 | stdout | Re-using existing destination: node-hp-scan-to - /WalkupScanToComp/WalkupScanToCompDestinations/1c85512e-b8a5-1f08-9de9-c8d9d2c6622a
2024/07/17 12:02:43 | stdout | Host destinations fetched: MININT-LC7E735, node-hp-scan-to
2024/07/17 12:02:43 | stdout | Running iteration: 1 - errorCount: 0
2024/07/17 12:02:43 | stdout | Temp folder: /tmp/scan-to-pcIoMppj
2024/07/17 12:02:43 | stdout | Target folder: /scan
2024/07/17 12:02:43 | stdout | Using device ip: 192.168.178.32
2024/07/17 12:02:43 | stdout | WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.
2024/07/17 12:02:43 | stdout | WARNING: No configurations found in configuration directory:/app/config
2024/07/17 12:02:42 | stdout | Starting
2024/07/17 12:02:42 | stdout | s6-rc: info: service legacy-services successfully started
2024/07/17 12:02:42 | stdout | s6-rc: info: service legacy-services: starting
2024/07/17 12:02:42 | stdout | s6-rc: info: service legacy-cont-init successfully started
2024/07/17 12:02:42 | stdout | cont-init: info: /etc/cont-init.d/10-adduser exited 0
2024/07/17 12:02:42 | stdout |  
2024/07/17 12:02:42 | stdout | -------------------------------------
2024/07/17 12:02:42 | stdout | User gid:    101
2024/07/17 12:02:42 | stdout | User uid:    1026
2024/07/17 12:02:42 | stdout |  
2024/07/17 12:02:42 | stdout | usermod: no changes
2024/07/17 12:02:42 | stdout | cont-init: info: running /etc/cont-init.d/10-adduser
2024/07/17 12:02:42 | stdout | s6-rc: info: service legacy-cont-init: starting
2024/07/17 12:02:42 | stdout | s6-rc: info: service fix-attrs successfully started
2024/07/17 12:02:42 | stdout | s6-rc: info: service fix-attrs: starting
2024/07/17 12:02:42 | stdout | s6-rc: info: service s6rc-oneshot-runner successfully started
2024/07/17 12:02:42 | stdout | s6-rc: info: service s6rc-oneshot-runner: starting

<!--EndFragment-->
manuc66 commented 4 months ago

@quench2259 Could you try again ?

quench2259 commented 4 months ago

@manuc66 I tried again, the pdf is created in the /tmp folder, but not moved to the /scan volume

manuc66 commented 4 months ago

I used this:

services:
  node-scan:
    image: docker.io/manuc66/node-hp-scan-to:master
    hostname: node-hp-scan-to
    environment:
      - IP=192.168.1.53
      - LABEL=paperless
      - PATTERN="scan"_dd.mm.yyyy_hh:MM:ss
      - PGID=1000
      - PUID=1000
      - TZ=Europe/London
    restart: unless-stopped

and got this:

$ docker-compose up 
[+] Running 1/1
 ✔ Container node-hp-scan-to-node-scan-1  Recreated                                                                                                                                  0.1s 
Attaching to node-scan-1
node-scan-1  | s6-rc: info: service s6rc-oneshot-runner: starting
node-scan-1  | s6-rc: info: service s6rc-oneshot-runner successfully started
node-scan-1  | s6-rc: info: service fix-attrs: starting
node-scan-1  | s6-rc: info: service fix-attrs successfully started
node-scan-1  | s6-rc: info: service legacy-cont-init: starting
node-scan-1  | cont-init: info: running /etc/cont-init.d/10-adduser
node-scan-1  | usermod: no changes
node-scan-1  | 
node-scan-1  | User uid:    1000
node-scan-1  | User gid:    1000
node-scan-1  | -------------------------------------
node-scan-1  | 
node-scan-1  | cont-init: info: /etc/cont-init.d/10-adduser exited 0
node-scan-1  | s6-rc: info: service legacy-cont-init successfully started
node-scan-1  | s6-rc: info: service legacy-services: starting
node-scan-1  | s6-rc: info: service legacy-services successfully started
node-scan-1  | Starting
node-scan-1  | WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
node-scan-1  | WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
node-scan-1  | WARNING: No configurations found in configuration directory:/app/config
node-scan-1  | WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.
node-scan-1  | Using device ip: 192.168.1.53
node-scan-1  | Target folder: /scan
node-scan-1  | Temp folder: /tmp/scan-to-pcoIIkmJ
node-scan-1  | Running iteration: 1 - errorCount: 0
node-scan-1  | Host destinations fetched: DESKTOP-RELMUJH, paperless, emmanuel-ms7850
node-scan-1  | Re-using existing destination: paperless - /WalkupScanToComp/WalkupScanToCompDestinations/0731f399-af09-4a77-bd6d-7dc1b69abdb7
node-scan-1  | Using: paperless
node-scan-1  | Waiting scan event for: /WalkupScanToComp/WalkupScanToCompDestinations/0731f399-af09-4a77-bd6d-7dc1b69abdb7
node-scan-1  | Start listening for new ScanEvent
node-scan-1  | Scan event captured, saving scan #0
node-scan-1  | Waiting user input: 1/50
node-scan-1  | Waiting user input: 2/50
node-scan-1  | Waiting user input: 3/50
node-scan-1  | Selected shortcut: SavePDF
node-scan-1  | Scan will be converted to pdf, using /tmp/scan-to-pcoIIkmJ as temp scan output directory for individual pages
node-scan-1  | ScanPlexMode is : Simplex
node-scan-1  | Afd is : Empty
node-scan-1  | New job created: http://192.168.1.53:8080/Jobs/JobList/11
node-scan-1  | Ready to download page job page 1 at: /Scan/Jobs/11/Pages/1
node-scan-1  | Page downloaded to: /tmp/scan-to-pcoIIkmJ/scan_17.07.2024_08:20:13.jpg
node-scan-1  | Job state: Completed, totalPages: 1:
node-scan-1  | Start listening for new ScanEvent
node-scan-1  | Scan of page(s) completed totalPages: 1:
node-scan-1  | The following page(s) have been rendered inside '/scan/scan_17.07.2024_08:20:12.pdf': 
node-scan-1  |  - page   1 - 1700x2338
node-scan-1  | Running iteration: 2 - errorCount: 0
node-scan-1  | Host destinations fetched: DESKTOP-RELMUJH, paperless, emmanuel-ms7850
node-scan-1  | Re-using existing destination: paperless - /WalkupScanToComp/WalkupScanToCompDestinations/0731f399-af09-4a77-bd6d-7dc1b69abdb7
node-scan-1  | Using: paperless
node-scan-1  | Waiting scan event for: /WalkupScanToComp/WalkupScanToCompDestinations/0731f399-af09-4a77-bd6d-7dc1b69abdb7
node-scan-1  | Start listening for new ScanEvent

And the file is there:

$ docker exec -it 905a2d587985 sh
/app # ls -al /scan/scan_17.07.2024_08:20:12.pdf
-rw-r--r--    1 node     node         77473 Jul 17 20:20 /scan/scan_17.07.2024_08:20:12.pdf

What are your parameters ?

quench2259 commented 4 months ago

Works! Thanks!