3 ms·
Some PDF files intentionally include a bad character mapping table (and reorder the font) as a form of DRM.
by dunham 5y ago
Some PDF files intentionally include a bad character mapping table (and reorder the font) as a form of DRM.
- mkl 5y agoIt's not very effective against anyone determined though. You can OCR easily. You can also rebuild the character mapping from the shapes of the glyphs, and in most languages there are few enough that you can even do it by hand.
- mcswell 5y agoYou can OCR if you're using a Latin script with few if any accent marks. Depending on your OCR engine, I suppose you could do Cyrillic too. Other scripts, not so much. (And yes, I'm a computational linguist, so we deal with non-Roman scripts all the time, particularly Arabic script. But I suppose that's not a problem for most people here :-).) There might be some Latin script fonts that cause problems, but I haven't looked into that very much--I do recall we had problems with an italic font.
- dunham 5y agoWhen I came across this I already had a pristine copy of the font, so I just compared the program for each character to determine the mapping. (I was automating the decoding.) I agree that there is little to no security there. But the point that I was not so clearly trying to make was that sometimes the messed up encoding is intentional and not a bug.