Using Drupal 7 and the Views PDF module, I have created a PDF output that looks perfect when opened in a browser, but is inconsistent everywhere else: On Chrome, Firefox, and Edge it is displayed exactly as designed; on
Acrobat Reader, it shows only a table background color, the rest is blank, and there is no text; on iPad and Outlook, it displays a blank white screen.

What would cause the PDF to display perfectly in a browser and horribly in everything else?

  • You first have to find out what it is that is different about the PDF before coming to Drupal to see why it created it that way. You should at least include screenshots showing the differences. Maybe it's something about your local Print settings that is different? – prkos Nov 15 '19 at 1:29

Ironically, the PDF document format was designed to display the same everywhere ... but that's an overly ambitious goal.

First note that "in the browser" isn't especially meaningful - different browsers, with different configurations, will use different engines to display the pdf.

Your different experiences are due to those different engine(s) in your browsers vs. the acrobat reader engine, which is perhaps also used for your ipad and outlook.

My best guess is that your browsers have access to some non-standard fonts that you're using in the output, but the other engines don't. Getting the views pdf to embed those fonts, or using standard fonts instead, will probably fix it.

| improve this answer | |
  • Funnily I had converted the font I was using to be embedded in the pdf through the library, but when it was being called via the stylesheet instead of the individual field properties in Views, it seems there was some disconnect. I changed the stylesheet call to arial to test the above and it is magically working. Thank you! – Jamie Nov 17 '19 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.