Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: html2pdf is not defined #2

Open
kynoptic opened this issue Aug 27, 2019 · 5 comments
Open

ReferenceError: html2pdf is not defined #2

kynoptic opened this issue Aug 27, 2019 · 5 comments
Assignees

Comments

@kynoptic
Copy link

When running this tool, I get the following error:

ReferenceError: html2pdf is not defined
    at /Users/username/Downloads/pdf-gcv-ocr-master/node_modules/jspdf/dist/jspdf.min.js:202:16291
    at /Users/username/Downloads/pdf-gcv-ocr-master/node_modules/jspdf/dist/jspdf.min.js:1:62
    at Object.<anonymous> (/Users/username/Downloads/pdf-gcv-ocr-master/node_modules/jspdf/dist/jspdf.min.js:1:66)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ocr: `node index.js ocr "/Users/username/Downloads/pdf-gcv-ocr-master/pdf-name.pdf"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] ocr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2019-08-27T13_54_23_774Z-debug.log

> [email protected] hocr /Users/username/Downloads/pdf-gcv-ocr-master
> ./makehOCR.sh "/Users/username/Downloads/pdf-gcv-ocr-master/pdf-name.pdf_ocr"

Provided argument is not a directory

> [email protected] pdf /Users/username/Downloads/pdf-gcv-ocr-master
> ./makePDF.sh "/Users/username/Downloads/pdf-gcv-ocr-master/pdf-name.pdf_ocr"

Provided argument is not a directory
Name-MacBook-Pro-2:pdf-gcv-ocr-master username$ 
@pratheekrebala pratheekrebala self-assigned this Aug 27, 2019
@pratheekrebala
Copy link
Member

Thanks for taking the time to raise this issue. Would you be able to provide us with the PDF file you are using so we could try and re-create this issue?

@kynoptic
Copy link
Author

Sure thing, the PDF is available here: julia-no-text-short.pdf

@chriszs
Copy link

chriszs commented Aug 28, 2019

Able to reproduce when installing with npm install. Installing with yarn gave me a likely unrelated GRPC build error.

@kynoptic
Copy link
Author

kynoptic commented Oct 8, 2019

For what it's worth, I tried again using the fork from @ailintom, but still had the same issue.

Let me know if there's anything else I can do to help!

@calitidexvii
Copy link

This is related to issue 2462 with the jsPDF dependency. You can fix this by editing package.json to use an older version of jsPDF before the error was introduced. Simply change line 14 from "jspdf": "^1.3.5", to "jspdf": "1.3.5", then re-run npm install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants