Coder Social home page Coder Social logo

Comments (1)

Balearica avatar Balearica commented on July 4, 2024

[Archive] v2 to v4 Guide

The following comment contains the old guide for upgrading from v2 to v4. Users are encouraged to update to the latest version (v5), but this is still provided for informational purposes.

Changes Impacting Most Users

  1. createWorker is now async
    • In most code this means worker = Tesseract.createWorker() should be replaced with worker = await Tesseract.createWorker()
  2. worker.load is no longer needed (createWorker now returns worker pre-loaded)
    • Simply delete worker.load from existing code

Changes Impacting Fewer Users

  1. Electron users
    • Use the browser version of Tesseract.js
      • In v2, many users used the Node.js version
  2. Users of getPDF function
    • This function has been replaced by pdf recognize option (#488)
    • See browser and node examples for usage
  3. Users who set cacheMethod: 'none' or cacheMethod: 'refresh' as workaround for caching bug
    • This workaround can be removed, the underlying bug has been fixed (see this comment)
  4. Users who set the optional corePath argument
    • You will need to point corePath to a compatible version of Tesseract.js-core (the latest version of Tesseract.js should be used with the latest version of Tesseract.js-core)
    • For significantly faster performance, set corePath to a directory that includes both tesseract-core.wasm.js and tesseract-core-simd.wasm.js
  5. Node.js <14 users
    • Node.js v14 is now the earliest version supported

from tesseract.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.