# PDF is blurry when zoomed out

**URL:** <https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954>\
**Category:** Technical Support\
**Created:** [November 13, 2023, 5:09am UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954 "2023-11-13T05:09:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev1](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dev1](https://pdfjs.community/u/dev1)\
**Post date:** [November 13, 2023, 5:09am UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/1 "2023-11-13T05:09:11Z")

</div>

**Which product are you using?**  
PDF.js Express Viewer

**PDF.js Express Version**  
8.7.4

**Detailed description of issue**  
In some pdfs, zooming out blurs the pdf.  
The blurring becomes stronger when the magnification is set to less than 100%.  
The blurring often occurs when the devicePixelRatio of the display I am using is 1.  
Accordingly, I tried using setCanvasMultiplier, but the blurring is not improved.  
How can I improve the blurring?  
I have attached the relevant PDF.

**Expected behaviour**  
When the magnification is less than 100% and the devicePixelRatio of the display being used is 1, the pdf is displayed without blurring.

**Does your issue happen with every document, or just one?**  
some document (not every, not just one)

[blurry-pdfjsexpress.pdf](https://pdfjs.community/uploads/short-url/kKZlLOrz7beTMTf1SSoqZSFqWvh.pdf) (698.0 KB)

[sample-blurry.pdf](https://pdfjs.community/uploads/short-url/xfwsDWcD3aQMTGHj3zq6ZXbX34d.pdf) (567.8 KB)

---

<div class="post-metadata">

**Author:** ![ejohnson](https://avatars.discourse-cdn.com/v4/letter/e/a3d4f5/32.png) [@ejohnson](https://pdfjs.community/u/ejohnson)\
**Post date:** [November 13, 2023, 4:53pm UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/3 "2023-11-13T16:53:31Z")

</div>

Thank you for posting the incident to our forum. We will provide you with an update as soon as possible.

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [November 14, 2023, 9:13pm UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/4 "2023-11-14T21:13:03Z")

</div>

Hello dev1,

Can you provide any sample photos of the blurriness?  
You tried setCanvasMultipier, did you try to rerender after doing this?

Best regards,  
Tyler

---

<div class="post-metadata">

**Author:** ![dev1](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dev1](https://pdfjs.community/u/dev1)\
**Post date:** [November 15, 2023, 3:34am UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/5 "2023-11-15T03:34:32Z")

</div>

As shown in the code below, after setCanvasMultiplier, loadDocument is done and rerender is done. image quality did not change whether loadDocument was done or not.

```javascript
        webViewer(
          {
            path: '/pdfjsexpress',
            initialDoc: path,
            licenseKey: key,
            extension: 'pdf',
            disabledElements,
          },
          viewerRef.value
        )
          .then((inst) => {
            // use APIs here
            inst.Core.setCanvasMultiplier(2)
            inst.loadDocument(path)
            instance = inst
          })

```

Also, as shown in the attached pdf, the pdf is hazy when setCanvasMultiplier is done and blurry when setCanvasMultiplier is not done. Either way the pdf is hard to read.Zoom magnification is 98%.

I would like to improve the image quality at all costs. I would really appreciate your help.

**Image using setCanvasMultiplier**

 ![use_setCanvasMultiplier](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/2X/9/9eeb26504e920da0c57eeb970b29e158575f0125.png)

**Image without setCanvasMultiplier**

 ![not_use_setCanvasMultiplier](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/2X/8/899950b8330532d6ee00a0bba3d78ed96323eba5.png)

[sample-blurry.pdf](https://pdfjs.community/uploads/short-url/xfwsDWcD3aQMTGHj3zq6ZXbX34d.pdf) (567.8 KB)

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [November 15, 2023, 10:49pm UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/6 "2023-11-15T22:49:06Z")

</div>

Hello dev1,

Have you tried setting the canvas multiplier higher?

There is a point at which the document should become blurry as the device’s resolution reaches the minimum legible font size.

What is the resolution of your screen?

Best regards,  
Tyler

---

<div class="post-metadata">

**Author:** ![dev1](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dev1](https://pdfjs.community/u/dev1)\
**Post date:** [November 16, 2023, 1:51am UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/7 "2023-11-16T01:51:41Z")

</div>

The resolution (screen size) is as follows  
1920 x 1080

The image also appears blurred at the following resolutions.  
3440 x 1440

The image quality was not improved by setting the setCanvasMultiplier value to 1, 2, or 3.

How can I set a higher canvas multiplier other than using the setCanvasMultiplier method? Can you express this in code?

---

<div class="post-metadata">

**Author:** ![dev1](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dev1](https://pdfjs.community/u/dev1)\
**Post date:** [November 17, 2023, 1:27am UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/8 "2023-11-17T01:27:29Z")

</div>

@tgordon Sorry to rush you, but I would appreciate an answer. I am really in a bind.

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [November 21, 2023, 9:08pm UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/9 "2023-11-21T21:08:25Z")

</div>

Hello dev1,

Apologies for the delay,  
I was still unable to reproduce this with the provided file and the resolutions.

When you do setCanvasMultipier, try resetting the zoom by doing, to trigger a rerender:

```javascript
instance.Core.documentViewer.zoomTo(instance.Core.documentViewer.getZoomLevel())

```

Let me know if this works for you.

Best regards,  
Tyler

---

<div class="post-metadata">

**Author:** ![dev1](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dev1](https://pdfjs.community/u/dev1)\
**Post date:** [November 22, 2023, 1:33am UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/10 "2023-11-22T01:33:34Z")

</div>

@tgordon

I have tried the following steps and the resolution remains the same.  
As usual, zooming in improves the image quality, but zooming out deteriorates it.  
Is there any other way?

```javascript

            instance.Core.setCanvasMultiplier(2)
            instance.Core.documentViewer.zoomTo(
              instance.Core.documentViewer.getZoomLevel()
            )
            instance.loadDocument(path)

```

---

<div class="post-metadata">

**Author:** ![dev1](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dev1](https://pdfjs.community/u/dev1)\
**Post date:** [November 29, 2023, 2:29am UTC](https://pdfjs.community/t/pdf-is-blurry-when-zoomed-out/2954/11 "2023-11-29T02:29:33Z")

</div>

@tgordon Sorry to rush you, but I am awaiting your response.
