Edit: It would seem that the error described below is due to the node incorrectly referencing the js library to be used. I am now having trouble doing a local deployment using "npm install c:\temp\node". The node will not show up in Node-Red
Original Problem Statement
I've got it in my mind that I'd like to try extracting text from a pdf when a trigger occurs. My basic workflow at the moment contains an inject node, a file input node, a pdf (node-red-contrib-pdfjs) node, and a debug node, connected in that order.
Node-red-contib-pdfjs seems to be the most recent version of the pdf reading nodes, and seems to have removed the necessity of having the now deprecated PhantomJS installed that other extensions required. This is a good thing, and hopefully also leaves the extension as processor type agnostic (I'm trying this on both x86 and ARM).
When I attempt to run the flwo with a known PDF file, I receive the following error in the debug node:
"UnknownErrorException: The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g.
ReadableStreamand/or
Promise.allSettled); please use an ES5-compatible build instead."
That message seems to imply that pdfjs is expecting to be used in a browser, rather than within a workflow. My browser shouldn't be the issue, and certainly I'm expecting the process to be able to run without the user having a browser open looking at the flow.
Any suggestions would be very welcome. Googling the issue/error hasn't returned results that I seem to be able to do much with.
My flow:
[{"id":"35ee59ff.5051ea","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"726f33c3.30fdc4","type":"pdf","z":"35ee59ff.5051ea","name":"","filename":"C:\\temp\\AEIP Report Laidley.pdf","sortByY":false,"sortByX":false,"combineColumn":false,"combineRow":false,"x":550,"y":360,"wires":[["f6046883.a5ae08"],["f6046883.a5ae08"]]},{"id":"f6046883.a5ae08","type":"debug","z":"35ee59ff.5051ea","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":380,"wires":[]},{"id":"750368df.c588d8","type":"inject","z":"35ee59ff.5051ea","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":360,"wires":[["bd24f9d2.f63a58"]]},{"id":"bd24f9d2.f63a58","type":"file in","z":"35ee59ff.5051ea","name":"","filename":"C:\\temp\\AEIP Report.pdf","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":400,"y":260,"wires":[["726f33c3.30fdc4"]]}]
@redbackspider0