vue-pdf icon indicating copy to clipboard operation
vue-pdf copied to clipboard

Fix fonts issue in printing

Open arioth opened this issue 6 years ago • 9 comments

The PDFJS library adds the fonts in the main document.fonts variable. So we need to passed those fonts to the iframe.

arioth avatar Jan 02 '19 17:01 arioth

We must also support browsers that does not support fonts api (see font_loader in PDFJS)

FranckFreiburger avatar Jan 02 '19 18:01 FranckFreiburger

@FranckFreiburger I push a new fix using a div container instead of the iframe. Mostly because I have an issue with firefox with the Font API in the iframe.

arioth avatar Jan 03 '19 14:01 arioth

+1 on this PR. Tested on a local build of a project I'm working on, and the font issues we were seeing with printing are indeed fixed with this. @FranckFreiburger any thoughts on getting this in with a patch version bump?

dkurucz avatar Jan 10 '19 16:01 dkurucz

Finally, it's working.

momoirocloverz avatar Apr 10 '19 08:04 momoirocloverz

+1 for this PR. Tested locally and it works like a charm.

tritrancs avatar Jun 28 '19 08:06 tritrancs

why is this not merged yet? What's the best way for me to install these changes @arioth ? The vue-pdf package on my app is installed through NPM, should i remove it and manually include the source files?

yordivd avatar May 27 '20 08:05 yordivd

It solved my print problem. Why is this not merged yet?

viktorbk avatar Jul 09 '21 07:07 viktorbk

Thanks, it helped me too!

DamirAkzhigitov avatar Jul 09 '21 08:07 DamirAkzhigitov