Opened 3 years ago

Closed 3 years ago

#2018 closed Bug (fixed)

PDF font text appear white in PDFs when read in google PDF reader

Reported by: matt Owned by:
Priority: low Milestone: Piwik 1.2
Component: UI - UX (AngularJS, twig, less) Keywords:
Cc: Sensitive: no

Description

Maybe just a problem with font color not set to a standard value?

Attachments (1)

PDFRenderer-font-embedding.diff (932 bytes) - added by peterb 3 years ago.
Embeds a given font completely (not only subgroups) - if the [fontName].z / [fontName].ctg.z is provided in the tcpdf/fonts directory.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by peterb (peterbo)

The root cause of the problem is that we do not completely embed the fonts in the PDF-reports. For Adobe reader (etc). it seems to be enough to embed subgroups of a font, but for a bunch of mobile pdf viewers and google pdf viewer, the font has to be completely embedded in the pdf.

Disadvantage of the full embedding is the increase of the filesize (e.g. dejavusans ~ +300kB). But it seems to be the only way to make sure that the PDF is shown correctly on all devices.

Google PDF Viewer example:

Changed 3 years ago by peterb (peterbo)

Embeds a given font completely (not only subgroups) - if the [fontName].z / [fontName].ctg.z is provided in the tcpdf/fonts directory.

comment:2 Changed 3 years ago by matt (mattab)

OK I think approx 400k is acceptable for a PDF report, and worth it rather than the PDF being not viewable on google, iphone etc.

+1

comment:3 Changed 3 years ago by vipsoft (robocoder)

Utilities like pdftotext also require the complete font to be embedded, so this practice isn't uncommon.

+1

comment:4 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

fixed in [3864]

Note: See TracTickets for help on using tickets.