# (internal) PDF viewer misses chosen letters from LaTeX generated PDF [closed]

Recently I uploaded a LaTeX generated PDF to an educational site which uses an internal PDF viewer (crocodoc). However, when displayed, many letters where missing. As far as I can tell it is mostly letters "f" that is missing.

In my preamble I wrote the following code:

``````\documentclass[11pt,a4paper]{article}

\usepackage[utf8]{inputenc}

\usepackage{fullpage}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{amsmath,amssymb,bm, accents}
\usepackage{pgfplots}

\usepackage{parskip}
``````

Any idea what might cause this display error?

• It would help if you posted a screenshot of the viewer output so we can see which letters are missing.
– Null
Oct 28, 2016 at 16:51
• If you compile the document on your device locally, does it contain all and everything that you expect to be displayed? Oct 28, 2016 at 16:54
• This is the topic starter writing. I merged my previous stackexchange accounts with tex.stackexchange and I am now unable to add a comment (due to low rep). By closer inspection I notice that it is only letters "f" and "fi" that is missing (as adressed above). When I compile the document there is no missing letters and everything looks fine, so it is only in the internal PDF viewer that the letters disappear. Unfortunately I have no way to carry out any test, as I am unable to upload anything to the educational site unless a task is open. So I can't tell if the microtype package and the soluti Oct 28, 2016 at 17:57
• does this happen with other services and/or PDF viewers? Oct 28, 2016 at 22:31
• I voted to close, see the OP's answer below ( tex.stackexchange.com/a/336453/4736 ). Nov 3, 2016 at 15:04

Try this: In your Preamble, place this code

``````\begingroup
\catcode`\_=12
\pdfglyphtounicode{f_f}{0066 0066}
\pdfglyphtounicode{f_i}{0066 0069}
\pdfglyphtounicode{f_l}{0066 006C}
\pdfglyphtounicode{f_f_i}{0066 0066 0069}
\pdfglyphtounicode{f_f_l}{0066 0066 006C}
\endgroup
``````

It won't hurt, and it might help. If it does not work... C'est la vie. If it works, it tells the PDF reader software how to look up certain ligatures.

Historically, the f f ligature was a specific character ff, with its own unicode point. Same with fi. But in modern Open Type method, the ligature names are likely to be f_f and f_i, and do not have specific code points. The software is supposed to understand.

Lower case "f" is part of many ligatures, that is, special character combinations like "fi" or "ffi". Maybe that is what is causing the problem. You can test by suppressing ligatures manually:

``````affinity        % should give a ligature
af{}f{}inity    % should not give a ligature
``````

If the letters in the second version show up, you can suppress ligatures globally using the `microtype` package:

``````\usepackage{microtype}
\DisableLigatures{encoding = *, family = * }
``````

Update: I read your answer/comment, and I comment here, since I have exactly the same account merging problem ;) Maybe for posterity it might be useful if you report back after you have carried out the test (whenever that may be).