Forum How do I...?

Lots of "fi" and "Th" being mangled in the PDF conversion

BaconCatBug
I am converting a fixed layout epub to PDF. In the raw hxtml these words are properly rendered (fighting and the for example), but when converted to PDF they end up becoming ligatured together and thus malformed when copypasted.

Any hints as to why this might be happening? Oddly enough it only happens when using Foxit or Adobe, Chrome copys them just fine.

http://www.princexml.com/doc/ligatures/#ligatures

Is there a way to disable this ligature detection? Specifically from the command line.

Edited by BaconCatBug

markbrown
Ligatures are a part of the font definition - the font manufacturer intends them to appear that way - so you get them by default. Copying and pasting of these glyphs is a common problem though; some viewers do a better job of deciphering them than others.

You can try a different font that doesn't have ligatures, or else disable them with the following snippet of CSS:
body { font-variant: prince-opentype(ccmp); }


There's no command line argument specifically for this, although you can put the above in a file and use the -s option.
BaconCatBug
Yeah from googling I found that solution, but when I tried to use the -s command to apply a stylesheet it gave me an error, so I ended up just adding that to the front of the 150 stylesheet css files with Notepad++ and it worked fine.

Thanks again!