fontObj is not a fontObj in pdf.js eval
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 394
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 7
Description
undefined:40950
fontObj.spaceWidth = (spaceId >= 0 && isArray(fontObj.widths)) ? fontObj.widths[spaceId] : 250;
^
TypeError: Cannot create property 'spaceWidth' on string 'Cannot read property '1' of undefined'
at CanvasGraphics_setFont [as setFont] (eval at <anonymous> (/node_modules/pdf3json/lib/pdf.js:60:1), <anonymous>:40950:32)
at CanvasGraphics_executeOperatorList [as executeOperatorList] (eval at <anonymous> (/node_modules/pdf3json/lib/pdf.js:60:1), <anonymous>:40560:27)
at InternalRenderTask__next [as _next] (eval at <anonymous> (/node_modules/pdf3json/lib/pdf.js:60:1), <anonymous>:43553:39)
at InternalRenderTask__continue [as _continue] (eval at <anonymous> (/node_modules/pdf3json/lib/pdf.js:60:1), <anonymous>:43545:14)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported PDF failure, then inspect /node_modules/pdf3json/lib/pdf.js around CanvasGraphics_setFont and the calls through CanvasGraphics_executeOperatorList. Trace why fontObj contains the reported string and define a regression check for the affected input; the issue does not name a test file or specify further acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100