# TypeError when loading pdf

**URL:** <https://pdfjs.community/t/typeerror-when-loading-pdf/601>\
**Category:** Bug Reports\
**Tags:** pdfjs-express\
**Created:** [March 12, 2021, 5:14am UTC](https://pdfjs.community/t/typeerror-when-loading-pdf/601 "2021-03-12T05:14:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark.richmond](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@mark.richmond](https://pdfjs.community/u/mark.richmond)\
**Post date:** [March 12, 2021, 5:14am UTC](https://pdfjs.community/t/typeerror-when-loading-pdf/601/1 "2021-03-12T05:14:53Z")

</div>

TypeError causes pdfjs-express to crash when loading certain pdf files… does not seem to be an issue in PDFTron. Please advise. Replicated using [PDF.js Viewer Demo | PDF.js Express](https://pdfjs.express/demo) and loading pdf file. Screenshot and pdf file attached.

PDFJSDocumentType.js:99 TypeError: Cannot read property ‘includes’ of undefined  
at new Glyph (PDFJSDocumentType.js:2248)  
at PDFJSDocumentType.js:2242  
at Array.map ()  
at Line.value (PDFJSDocumentType.js:2242)  
at **webpack\_exports**.\_parseTextData (PDFJSDocumentType.js:2299)  
at PDFJSDocumentType.js:2279  
at PDFJSDocumentType.js:2302

[sample\_part.pdf](https://pdfjs.community/uploads/short-url/uQYbs9zyl1Ao8RkqrVddgQN36is.pdf) (10.3 KB)

 ![Screen Shot 2021-03-11 at 9.12.06 PM](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/0f47d283336cc67cdc819bd2d6b8bfd680776d69.png)

---

<div class="post-metadata">

**Author:** ![mark.richmond](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@mark.richmond](https://pdfjs.community/u/mark.richmond)\
**Post date:** [March 12, 2021, 4:59pm UTC](https://pdfjs.community/t/typeerror-when-loading-pdf/601/2 "2021-03-12T16:59:44Z")

</div>

@Logan … you seem to be the local wizard. 😌  
Potential new customer here… can you help figure this out for me?

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [March 12, 2021, 9:20pm UTC](https://pdfjs.community/t/typeerror-when-loading-pdf/601/3 "2021-03-12T21:20:36Z")

</div>

Hey there,

I can reproduce your issue. This is an issue specific to this document that I’ll have to investigate.

Ill keep you posted, but hopefully this will be fixed in the next release!

Thanks,  
Logan

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [March 12, 2021, 9:32pm UTC](https://pdfjs.community/t/typeerror-when-loading-pdf/601/4 "2021-03-12T21:32:40Z")

</div>

Hey @mark.richmond

I found a fix for the issue and it will be fixed in the next patch!

Thanks for the report,

Logan

---

<div class="post-metadata">

**Author:** ![mark.richmond](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@mark.richmond](https://pdfjs.community/u/mark.richmond)\
**Post date:** [March 12, 2021, 9:56pm UTC](https://pdfjs.community/t/typeerror-when-loading-pdf/601/5 "2021-03-12T21:56:24Z")

</div>

That’s great… what is your release cadence?

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [March 12, 2021, 10:08pm UTC](https://pdfjs.community/t/typeerror-when-loading-pdf/601/6 "2021-03-12T22:08:55Z")

</div>

We don’t really have a fixed schedule. We try to release a minor version once every month or two, and we push patches as needed. Once the fix has gone through code review and gets merged, I’ll push the patch.

Thanks!
