Answers.Body: <p>The PDF generator uses the HTML to create the PDF. So changing CSS will have effect. But.. to have a different font in the PDF, the font should be available on the server. If the font is not available on the server (and the pdf generator) then a fall-back font is used.</p>
  
  <p>Here's some more info about DOMPDF (the tool CiviCRM is using for creating PDF's):</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/12581156/custom-fonts-for-dompdf">https://stackoverflow.com/questions/12581156/custom-fonts-for-dompdf</a></li>
  <li><a href="https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding" rel="nofollow noreferrer">https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding</a></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-30T22:43:21.137Z
Answers.LastActivityDate: 2015-12-30T22:43:21.137Z
Answers.LastEditDate: 2017-05-23T12:38:59.763Z
Answers.UserDisplayName: Catorghans
Answers.Body: <p>Did you look at print.css? It is in the civicrm/css folder.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-29T21:11:17.313Z
Answers.Text: I tested it: it works. The problem is that the changes there are probably lost at the next update of civicrm.
Answers.UserDisplayName: Pierre François
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-18T00:19:48.777Z
Answers.LastActivityDate: 2019-02-18T00:19:48.777Z
Answers.UserDisplayName: Karen-Ann
Answers.Body: <p>You need to use <a href="http://www.w3schools.com/css/css_howto.asp" rel="nofollow">inline css</a>. I think it has something to do with Civi using mail framework to generate its templates.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-02T04:58:44.233Z
Answers.Text: I had already discovered that, thanks (see question!). No, sorry, I am asking about the layout of *PDF* reports
Answers.UserDisplayName: David Christie
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-02T06:26:39.363Z
Answers.Text: Oh, sorry! You probably know this too then: in each report instance you have the possibility to edit the header and footer of the PDF display of reports, by changing the html code found under Report settings. At the bottom of the header code, you have a line starting like this: <body><div id="crm-container"> I suspect that if you enter inline css to that div, it will affect the style and fonts of the entire report.
Answers.UserDisplayName: Flying
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-02T07:00:08.637Z
Answers.Text: There you actually also have the possibility to link to a different css-file for the whole report, as explained in the tip for the header
Answers.UserDisplayName: Flying
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-02T18:58:16.827Z
Answers.Text: My CSS inline stuff only affected the screen layout but not the *generated PDF*, which is probably reasonable, since CSS has little to do with PDF. It looked to me that the PDF was generated by a different mechanism
Answers.UserDisplayName: David Christie
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-01T18:40:15.093Z
Answers.LastActivityDate: 2015-09-01T18:40:15.093Z
Answers.UserDisplayName: Flying
Body: <p>I have managed to clean up the display of membership lists (civireport) to the satisfaction of our users by linking a CSS file to the report header, but I do not find how to adjust the font and layout of generated PDF (is that even possible?)</p>
  
Tags: <civireport><pdf>
Title: How can I adjust the fonts and layout of PDF reports?
ThreadText: # How can I adjust the fonts and layout of PDF reports?
  
  (Asked by: username_0 on 2015-08-28)
  
  I have managed to clean up the display of membership lists (civireport) to the satisfaction of our users by linking a CSS file to the report header, but I do not find how to adjust the font and layout of generated PDF (is that even possible?)
  
  **Tags:** civireport, pdf
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2015-12-30. Score: 2
  
  The PDF generator uses the HTML to create the PDF. So changing CSS will have effect. But.. to have a different font in the PDF, the font should be available on the server. If the font is not available on the server (and the pdf generator) then a fall-back font is used.
  
  Here's some more info about DOMPDF (the tool CiviCRM is using for creating PDF's):
  
  1. <https://stackoverflow.com/questions/12581156/custom-fonts-for-dompdf>
  2. <https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding>
  
  
  ---
  
  ### Answer by username_2 on 2019-02-18. Score: 2
  
  Did you look at print.css? It is in the civicrm/css folder.
  
  > **Comments:**
  > **username_3**: I tested it: it works. The problem is that the changes there are probably lost at the next update of civicrm.  
  
  ---
  
  ### Answer by username_4 on 2015-09-01. Score: 0
  
  You need to use [inline css](http://www.w3schools.com/css/css_howto.asp). I think it has something to do with Civi using mail framework to generate its templates.
  
  > **Comments:**
  > **username_0**: I had already discovered that, thanks (see question!). No, sorry, I am asking about the layout of *PDF* reports  
  > **username_4**: Oh, sorry! You probably know this too then: in each report instance you have the possibility to edit the header and footer of the PDF display of reports, by changing the html code found under Report settings. At the bottom of the header code, you have a line starting like this: <body><div id="crm-container"> I suspect that if you enter inline css to that div, it will affect the style and fonts of the entire report.  
  > **username_4**: There you actually also have the possibility to link to a different css-file for the whole report, as explained in the tip for the header  
  > **username_0**: My CSS inline stuff only affected the screen layout but not the *generated PDF*, which is probably reasonable, since CSS has little to do with PDF. It looked to me that the PDF was generated by a different mechanism  
  
  ---
  
  