
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
This node will help you to handle (scanned image) pdfs and images. Important Note: Works only in a windows environment.
The OCR will be either made by tesseract.js or if installed by tesseract -> (tested with pre-build installer for windows tesseract 5.0.0 alpha).
Set the option you wish to do:
To improve the ocr reading set a language by using the ISO_639-2/T code. Default is english ('eng').
Set the image quality (75 or 150 dpi should be more than enough for good results). Higher values will result in slower ocr / bigger file size.
If you want to save the files to a directory you can state it under "Save image output to folder".
Alternatively you can heck 'Return Images' if you want to extract the whole page images from the pdf. The result will be written in msg.pdfImages as an object with the keys 'page' (pagenumber) and 'data' (buffer of the images).
You can save them with the standard file node (default or utf-8). The suffix must be '.png'.
For this option tesseract must be installed!
If you want to use tesseract instead of tesseract.js you have to state the command call (should be tesseract).
You can set msg.tessCommand or type it directly in the node. It will be joined with the field 'tesseract command call', so don't start the command line with 'tesseract'.
Load a pdf or valid image file with the 'file in' or the 'http' node. The result of those nodes must be a buffer object. This is not necessary if you use the tesseract command line.
Use the 'file' node to save the pdf and/or the images on your filesystem.
You can find a sample flow in the node red imports.

This node can be used without tesseract installed. This will result in using tesseract.js which is currently much slower to make your images and pdfs readable. You can try to use tessdata fast but it will reduce the quality of the ocr.
As we can't create multiple workers to recognize multiple pages (can results in memory leak) we only use one tesseract worker. If scheduler with multiple workers can handle the getPdf function someday (or a workaround is found) it could reduce the time significant!
Therefore if possible install tesseract.
For windows you can use a simple installer. Just check if afterwards your environment variable is correctly set and do reboot.
Control Panel > System and Security > System > Advanced system settings > Advanced > Environment variables > PATH > New

FAQs
Add text to PDFs by OCR for all images (e.g. scanned document)
The npm package pdf-red receives a total of 7 weekly downloads. As such, pdf-red popularity was classified as not popular.
We found that pdf-red demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.