# Page Width Error:

**URL:** <https://pdfjs.community/t/page-width-error/967>\
**Category:** Bug Reports\
**Created:** [August 28, 2021, 4:04pm UTC](https://pdfjs.community/t/page-width-error/967 "2021-08-28T16:04:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottkemperman](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scottkemperman](https://pdfjs.community/u/scottkemperman)\
**Post date:** [August 28, 2021, 4:04pm UTC](https://pdfjs.community/t/page-width-error/967/1 "2021-08-28T16:04:37Z")

</div>

| UI version | 7.3.0 |
| --- | --- |
| Core version | 7.3.2 |
| Build | My8yMi8yMDIxfDQwM2IyMDFjNg== |
| WebViewer Server | false |
| Full API | false |

We are running into an intermittent and puzzling error when trying to call ‘setFitMode(FitMode.FitWidth)’. About 5 - 10% of the time, this function call will squish all of the pages contents to the left of the viewer area, instead of actually fitting it to the page like it normally does and is expected to.

This appears to be consistent across any PDFs we load. I think it is best explained by looking at the comparison images:

A fix or workaround for this fix would be much appreciated, as I have no idea why it pops up once every 20 loads or so. The intermittent aspect has made it very difficult to debug.

 ![page-width-fail](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/f69d0bf33ef2ef07c67826de0a4bcd208b1b1dc2.jpeg)

 ![page-width-success](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/d9668ed9884c11e558c36a49e4f43ca9a9482927.jpeg)

---

<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:** [August 30, 2021, 3:55pm UTC](https://pdfjs.community/t/page-width-error/967/2 "2021-08-30T15:55:33Z")

</div>

Hey there!

This is a known issue and we will be investigating this soon. I’ll keep you posted on any updates.

Thanks,  
Logan

---

<div class="post-metadata">

**Author:** ![scottkemperman](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scottkemperman](https://pdfjs.community/u/scottkemperman)\
**Post date:** [August 30, 2021, 11:59pm UTC](https://pdfjs.community/t/page-width-error/967/3 "2021-08-30T23:59:01Z")

</div>

Thank you for the reply,

Are you able to give me an estimated timeline on the issue? We have a strict release date so will need to alert our customers now if we are not going to have it fixed soon.

Scott

---

<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:** [September 1, 2021, 2:16pm UTC](https://pdfjs.community/t/page-width-error/967/4 "2021-09-01T14:16:56Z")

</div>

Hi there,

I’ll talk to the team and see if they can prioritize this for the next release. I’ll get back to you today with more details.

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:** [September 1, 2021, 7:20pm UTC](https://pdfjs.community/t/page-width-error/967/5 "2021-09-01T19:20:30Z")

</div>

Hey there,

We found a fix for this issue and expect it to be included in the next release. We do not have a timeline for the next release yet but it should be fairly soon.

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:** [September 8, 2021, 8:26pm UTC](https://pdfjs.community/t/page-width-error/967/6 "2021-09-08T20:26:16Z")

</div>


