I use pdf-visual-diff in my repo and got the following error.
node ➜ /workspaces/pdf-test (master) $ yarn ts-node index.ts
yarn run v1.22.19
$ /workspaces/pdf-test/node_modules/.bin/ts-node index.ts
Warning: loadFont - translateFont failed: "UnknownErrorException: Unable to load binary CMap at: /workspaces/pdf-test/node_modules/pdf-visual-diff/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap".
Warning: Error during font loading: Unable to load binary CMap at: /workspaces/pdf-test/node_modules/pdf-visual-diff/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap
Warning: loadFont - translateFont failed: "UnknownErrorException: Unable to load binary CMap at: /workspaces/pdf-test/node_modules/pdf-visual-diff/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap".
Warning: Error during font loading: Unable to load binary CMap at: /workspaces/pdf-test/node_modules/pdf-visual-diff/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap
The correct cmaps path is \
/workspaces/pdf-test/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap
but \
/workspaces/pdf-test/node_modules/pdf-visual-diff/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap \
(/workspaces/pdf-test is base dir of my repo.)
I use pdf-visual-diff in my repo and got the following error.
The correct cmaps path is \
/workspaces/pdf-test/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap
but \/workspaces/pdf-test/node_modules/pdf-visual-diff/node_modules/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap
\ (/workspaces/pdf-test
is base dir of my repo.)This PR fixes pdfjs-dist path resolution.