I'm adding this as an feature because may be dompdf is including font or something like that we can disable from the module admin? 1.5mb pdf file for 2 pages of plain text is too much.

Comments

hkirsman created an issue. See original summary.

hkirsman’s picture

I found the offending font style:

body {
  font-family: "DejaVu Sans", Helvetica, Arial, sans-serif;
}

in
entity_print/css/entity-print.css

benjy’s picture

That was added to fix another reported issue here #2851057: DomPDF, special characters

hkirsman’s picture

Ok, don't know what to add.
May be there should be something in the admin? Font override with hint to use in case of support for unicode characters? Or is it tcpdf issue?

hkirsman’s picture

Anyways, my thought on this is that the extra font should not be enabled by default but it would be nice to have it clearly brought out in admin and easily enabled.
I also tested this ✓ mark in one of our other projects. They sell books online. That system is using mpdf there and also the font failed with this unicode sign.

benjy’s picture

I think Dompdf has an option about embedding or not embedding the fonts so happy to take a patch here that adds it as an option in the admin panel.

mstrelan’s picture

Is the tick issue actually a bug in DomPDF? Or do browsers not render the tick either? If it's the former the issue should be resolved by DomPDF, not this module. It sounds to me that if you want to use a tick you should have to choose the font yourself. After removing DejaVu Sans my PDFs dropped from 1.3MB to 63KB.

nikita_tt’s picture

Just enable this new option. This could help.
But the problem is still in "DejaVu Sans" font. You can use another one (Helvetica for example) but "DejaVu Sans" supports some special chars (Polish letters and other symbols).

nikita_tt’s picture

Status: Active » Needs review
viappidu’s picture

Working a beauty for me on 8.7.x
Went from 897kb to 64kb!
Great job!

Rhodungeon’s picture

Will it be committed or not?
I would like not to apply patches on installed modules.

Thank you very much