Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Error resolution

QR code generated by JavaScript with OCR

Last updated on 29 September 2023

Admin
M-Files OCR

Overview

If M-Files Server is set for Scanning and Text Recognition (OCR) and a document contains QR code that is generated by JavaScript, converting that document to a searchable PDF fails.

Cause and Reason

Since the JavaScript should be executed on the M-Files Server computer, the OCR process fails. This is by design due to the security risk of executing JavaScript on the M-Files Server level. 

You should notice that the document contains JavaScript when opening the document for viewing unless the popup "This document contains JavaScript. Do you wish to enable all JavaScript actions in this document?" has been suppressed earlier.

Solution

Edit or create documents in a way that it already contains the QR code when M-Files Server does the scanning and text recognition. This way, there's no need to execute JavaScript code on M-Files Server level.

Still need help?