Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Learn More

PDF Text Clipping

  • 8 odpovedí
  • 1 má tento problém
  • 65 zobrazení
  • Posledná odpoveď od michael489

more options

I have two PDFs that I designed and uploaded to our website, but the headline in both displays with clipped characters in Firefox. Different fonts were used in both and the issue is the same. I even tried adding more tracking then re-uploading, the issue persists.

I checked in other browsers and the text displays as intended. The attached screenshots show the issue in Firefox, compared to how it should look (viewed in Chrome).

It's only this one line of text that is affected and I don't know why.

I have two PDFs that I designed and uploaded to our website, but the headline in both displays with clipped characters in Firefox. Different fonts were used in both and the issue is the same. I even tried adding more tracking then re-uploading, the issue persists. I checked in other browsers and the text displays as intended. The attached screenshots show the issue in Firefox, compared to how it should look (viewed in Chrome). It's only this one line of text that is affected and I don't know why.
Priložené obrázky

Upravil(a) bg-design dňa

Vybrané riešenie

I got to the bottom of the issue: variable weight fonts.

I normally avoid installing them, for this exact reason, but I must have overlooked when I installed these two.

I just deleted the variable weight versions and installed the static fonts instead. Issue fixed.

Čítať túto odpoveď v kontexte 👍 0

Všetky odpovede (8)

more options

Firefox's PDF viewer reconstructs the PDF as an HTML document and writes the text to an HTML canvas. Sometimes there are problems with unusual fonts, but I can't tell whether that is the issue in this case.

To try to isolate a program problem vs. a setting/add-on/data problem:

New Profile Test

This takes about 3 minutes, plus the time to test your document.

Inside Firefox, type or paste about:profiles in the address bar and press Enter/Return to load it.

Take a quick glance at the page and make a mental note of which Profile has this notation: This is the profile in use and it cannot be deleted. That is your current default profile.

Click the "Create a New Profile" button, then click Next. Assign a name like Feb2022, ignore the option to relocate the profile folder, and click the Finish button.

Firefox will switch your default profile to the new one, so click the Set as Default Profile button for your regular one to avoid an unwanted surprise at your next startup.

Scroll down to Feb2022 and click its Launch profile in new browser button.

Firefox should open a new window that looks like a brand new, uncustomized installation. (Your existing Firefox window(s) should not be affected.) Please ignore any tabs enticing you to connect to a Sync account or to activate extensions found on your system to get a clean test.

Does the document render any differently in the new profile?

When you are done with the experiment, you can close the extra window without affecting your regular Firefox profile. (Feb2022 will remain available for future testing.)

Pomohla vám táto odpoveď?

more options

Hey @jscher2000,

I just tried your test and the issue persists.

The two fonts in question are Spartan and Oswald, both of which are Google fonts I've used extensively without issue. The fonts are both used throughout the document with no issue, it's just this one area in both my PDFs that have this clipping.

I've tried deleting the text and retyping it by hand, applying styles manually rather than from my InDesign paragraph styles but it still clips.

Pomohla vám táto odpoveď?

more options

Hi, can you create a new issue with attached exemplary PDF file on https://github.com/mozilla/pdf.js/issues ? Thanks.

Pomohla vám táto odpoveď?

more options

Do you notice any pattern of problems with bold vs. normal weight text?

Pomohla vám táto odpoveď?

more options

Vybrané riešenie

I got to the bottom of the issue: variable weight fonts.

I normally avoid installing them, for this exact reason, but I must have overlooked when I installed these two.

I just deleted the variable weight versions and installed the static fonts instead. Issue fixed.

Pomohla vám táto odpoveď?

more options

I'm not sure that has been filed as an issue, so if you think it's a kind of font that will gain increasing use, it might be worth submitting one.

Pomohla vám táto odpoveď?

more options

I'm not sure about the popularity of Spartan, but Oswald is very widely used. Google began rolling out the variable weight versions of their fonts...I'm not exactly sure, but I believe sometime in the past year or two, so this could become a bigger issue since they default to variable weight versions when you download many of their fonts now.

I'll submit an issue about variable fonts in general.

Thanks for the help; your tip about font weight is what got me thinking.

Pomohla vám táto odpoveď?

more options

I've opened a ticket which demonstrates the issue when rendering variable weight fonts - this looks to be the same issue being discussed here.

https://github.com/mozilla/pdf.js/issues/14941

Pomohla vám táto odpoveď?

Položiť otázku

Ak chcete pridať odpoveď, musíte sa prihlásiť k svojmu účtu. Ak účet doteraz nemáte, položte novú otázku.