I have tried using PDF.js, traced its code and find it insert CSS rule with font data to make the characters drawn to canvas display properly. But if I do the same I wasn't able to get the same result, I can't figure out why, can just guess it works only when characters are drawn one by one but not as normal text in HTML. Anyone know if it is possible to extract fonts from PDF solely from client side JavaScript? Thanks.