Title: Illustrator saves PDFs with corrupted text (copy/paste gives garbage characters), but only for PDFs from Word and LibreOffice and some specifics fonts. Arial for example.
Hi all, I'm stuck on a problem I haven't been able to solve.
I work on an official gazette and receive finished PDFs from other people. I open them in Illustrator for adjustments and save them as PDF again. With some files, the PDF Illustrator writes has corrupted text: if I select and copy the text in a PDF viewer, strange characters appear instead of letters.
The page looks fine visually, and the problem only shows up when copying or searching the text. When I try to copy, I get tab symbols and small dots instead of letters.
To isolate the cause, I ran a test with a short sentence in Arial, written in four different programs and exported to PDF:
Word: corrupted after going through Illustrator.
LibreOffice Writer: corrupted as well.
Google Docs: comes out correct.
Inkscape: I opened the Word PDF in Inkscape, exported it again, and took that to Illustrator. It came out correct.
Some details that may help:
I use File > Open. The text is selectable, the font shows as ArialMT Regular, and there is no missing-font warning.
If I copy the text inside Illustrator and paste it elsewhere, it comes out right. The error only appears in the PDF it saves.
The same thing happens on other computers. I also tried File > Place, which didn't help.
The defect only shows up with certain files and certain fonts, not all of them.
The source PDFs are fine: the text copies normally when they are opened in any other viewer.
When saving, I use "Save as PDF with default options".
I examined the internal structure of the test PDFs and found a difference that might be a clue. In the Google Docs and Inkscape files, the embedded font has a Unicode character table (cmap 3,1) with the real letter values. In the Word files, the embedded font has no cmap at all, with renumbered glyphs (1, 2, 3ā¦). In the LibreOffice files, it only has a Macintosh-type cmap (1,0) with arbitrary codes. In both cases the text exists only in the PDF's ToUnicode mapping, which is present and correct. It looks like Illustrator doesn't make use of it when rewriting the file.
This explanation doesn't fully hold up: the PDF that Illustrator itself writes from the good file also has no cmap in the font and works. So I'm not sure the missing cmap is the cause. I think it's a useful clue, but not a conclusive one.
Has anyone seen this before? Is there an import or export setting that makes Illustrator preserve the text of these PDFs without going through Inkscape? I can't convert files one by one, because there are too many and they arrive already finished.
EDIT 1: I work for a "municipal official gazette"āa mandatory digital publication for municipal governments.
In reality, no changes are made to these PDFs; they are simply inserted into templates that include a header and a footer.