This is an archived forum post. The information may be outdated. Contact us if you have any questions.

PDF Text is Missing

epictions wrote on 2015-04-01:
Hi,

The text from generated PDFs is missing in our PDFs. We regularly generate PDFs and it was working fine till Hanuary. However, when we tried it last week, all text was missing.

Example page: http://lenovocat.staging.wpengine.com/product/thinkpad-10/

Thanks.
epictions wrote on 2015-04-05:
Any updates on this?
support wrote on 2015-04-07:
Hello,

When the page is loaded the first time without any cookies set, it renders a modal dialog on a transparent background. My guess is that the dialog and the background is causing the problem. Could you try to disable the dialog+background and let me know if it helps?
epictions wrote on 2015-05-12:
Hello

Last time, we were able to fix this by adding JS to header that blocked page till fonts loaded.

It worked fine till Thursday (May 7). However, as of yesterday, the issue is happening again even with that code.

Regarding the modal dialog, Print CSS hides the modal. If that was the issue, it would cover whole page(we noticed that happening couple of months back and fixed that)

Can you please take a look into this a bit quickly?

Thanks you.
support wrote on 2015-05-13:
Hello,

Our system reports:

ReferenceError: Can't find variable: FontFace [http://lenovocat.staging.wpengine.com/product/thinkpad-10/:78]


the said line looks like this:
var lenovo_regular = new FontFace(...);


Our system does not support the FontFace object. You either have to use the @font-face CSS rule instead or do not use a custom font.
epictions wrote on 2015-05-26:
Even after removing that piece of code (it was added in first place because text wasn't appearing), the PDF is blank!

Here's a generated PDF: https://www.evernote.com/l/ABuIehCHPd5JLbWegzPR7nXs7EF2isooaOw
epictions wrote on 2015-05-27:
I tried to embed fonts in stylesheet using base64 encoding but even that does't work.

The fonts that we have are in otf. Can this be because of that?
epictions wrote on 2015-05-28:
Hi,

Any updates on this one?

Thanks.
support wrote on 2015-05-29:
Hello,

If you load the page in Chrome and enable the CSS print media emulation, there is the following error in the console:
Failed to decode downloaded font: data:font/opentype;charset:utf-8;base64,AgFbmJzcGFjZUFtYWNyb25BYnJldmVBcmlu?gCOIJJglyCd8KMgp3CwELfgwLDE0Mrw0hDbYOVQ7yD4QQGBCZERURkRHREhMSXRKjEu8TLxO0E   (index):1


Could you please fix this error and let me know if it helps?
epictions wrote on 2015-05-30:
Hi,

The error is fixed, I still get no text. Here's a PDF that I just generated: https://www.evernote.com/l/ABvAS9F5CuxLro5DZ2l5K1kO0lgVi84Rbxs

Thank you.
support wrote on 2015-05-30:
Hello,

The font files listed below return the "Cache-Control:no-cache" HTTP header. This seems to trigger a bug in our software. Changing the header to something like "Cache-Control:max-age=3600" should fix the problem.

http://lenovocat.staging.wpengine.com/wp-content/themes/lenovo-catalogue/fonts/Lenovo/LENOVOBD.otf
http://lenovocat.staging.wpengine.com/wp-content/themes/lenovo-catalogue/fonts/Lenovo/LENOVOMD.otf
http://lenovocat.staging.wpengine.com/wp-content/themes/lenovo-catalogue/fonts/Lenovo/LENOVORG.otf
epictions wrote on 2015-05-31:
Hello,

On this URL fonts return cache-control: public, max-age=2592000

However, the text is still blank! Maybe the issue is somewhere else.

Thank you.
epictions wrote on 2015-05-31:
Hi,

I made some changes to stylesheet and this url printed fine.

Did you make some changes? I just moved the @font-face to top of print.css and it started working.

Thank you.
support wrote on 2015-06-02:
Hello,

No changes on our end at all. I'm glad to hear it works.