#772637 poppler-utils: pdftotext keeps ligatures from the PDF file instead of converting them to usual text

Package:
poppler-utils
Source:
poppler
Description:
PDF utilities (based on Poppler)
Submitter:
Vincent Lefevre
Date:
2021-10-02 14:57:05 UTC
Severity:
important
#772637#5
Date:
2014-12-09 13:05:16 UTC
From:
To:
pdftotext has improved to generate ASCII instead of ligatures (like ff)
but it still generates ligatures in some cases. For instance, if I run
pdflatex on the following file:
------------------------------------------------------------
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}
\thispagestyle{empty}

chiffre

ê

\end{document}
------------------------------------------------------------

I get some ff-lig1.pdf PDF file (attached), and running pdftotext on
it gives:

chiffre
ê

This is OK. But if I run ps2pdf on this PDF file, I get some other
ff-lig1-gs.pdf PDF file (attached), and running pdftotext on it gives:

chiffre
ê

i.e. with a ligature, which makes searching text such as "chiffre"
unpredictable (the output is also less readable in a terminal with
a monospace font).

This problem doesn't occur if I replace "ê" by "é" in the LaTeX file!

Note that xpdf finds "chiffre" in both cases, so that the bug seems
to be in pdftotext. Moreover pdftotext from poppler-utils 0.18.4-6
(wheezy) gives the ligature on the 4 attached PDF files, so that it
seems that pdftotext has been improved except in the particular case
mentioned above.

#772637#10
Date:
2021-10-02 11:24:03 UTC
From:
To:
Issue still present. According to Ghostscript developers, ps2pdf
behaves correctly, and it is up to the PDF consumer to handle the
ligatures.

FYI, the PDF viewer atril does recognize the ligature, and a search
for the 2 characters "ff" matches.

#772637#19
Date:
2021-10-02 11:31:08 UTC
From:
To:
Better title.
#772637#26
Date:
2021-10-02 14:55:34 UTC
From:
To:
There's an upstream bug:

https://bugs.freedesktop.org/show_bug.cgi?id=7002

"pdftotext and copy-n-paste from a document should expand ligatures
such as fi to the letters f and i."

Exactly this. But it was fixed in 2012. What happens with Debian?