Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Vanwege onderhoudswerkzaamheden die uw ervaring zouden moeten verbeteren, heeft deze website beperkte functionaliteit. Als een artikel uw probleem niet verhelpt en u een vraag wilt stellen, kan onze ondersteuningsgemeenschap u helpen in @FirefoxSupport op Twitter en /r/firefox op Reddit.

Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

How to prevent ui.textScaleFactor from affecting pdf.js?

  • 6 antwoorden
  • 0 hebben dit probleem
  • 1 weergave
  • Laatste antwoord van mahdi.nazemi

more options

I recently learned about the `ui.textScaleFactor` option and found it very helpful to adjust the text size. I have currently set the option to 115. However, changing `ui.textScaleFactor` distorts texts rendered by pdf.js such that neighboring characters somewhat overlap.

Is it possible to disable `ui.textScaleFactor` on pdf.js?

Browser: Firefox 111.0 OS: macOS Ventura (13.2.1)

I recently learned about the `ui.textScaleFactor` option and found it very helpful to adjust the text size. I have currently set the option to 115. However, changing `ui.textScaleFactor` distorts texts rendered by pdf.js such that neighboring characters somewhat overlap. Is it possible to disable `ui.textScaleFactor` on pdf.js? Browser: Firefox 111.0 OS: macOS Ventura (13.2.1)

Alle antwoorden (6)

more options

I realized a bit later that `browser.display.os-zoom-behavior` should be set to 2 to see the issue. So it looks like the combination of the two options is causing this behavior.

more options

There can always be issues with text overlapping or text disappearing if you only enlarge the text on pages that position text absolutely or have containers with fixed dimensions. Best is always to use full page zoom and not zoom text only.

  • browser.display.os-zoom-behavior = 1
more options

Thank you for the explanation!

I see your point, but I am curious about how pdf.js handles the zoom preferences (when "Zoom text only" is checked). When I set `browser.display.os-zoom-behavior` to 1 and check "Zoom text only", I see the PDF is rendered correctly regardless of the zoom level.

more options

When you view a PDF in the built-in viewer, what you actually see is a background image for each page drawn on an HTML canvas. There is a transparent text later in the front of the image for purposes of Find and Copy. Possibly that layer will be misaligned when Firefox is using Zoom Text Only but I haven't checked.

more options

Interesting!

I added two screenshots to a GitHub issue I created: https://github.com/mozilla/pdf.js/issues/16164

Looking at the screenshots again, I don't think an alignment problem exists.

more options

@jscher2000, you were indeed right about the transparent layer being the issue. I accidentally pressed <kbd>CMD</kbd><kbd>A</kbd> on my keyboard on found that the transparent layer is rendered differently from the actual PDF. You can see a screenshot here.