title: FPDF running locally, but not online
body: <p><strong>UPDATE:</strong> I've tried disabling all references to the font and used Arial instead. It works now, but as mentioned it messes with ÆØÅ which aren't included in this font.
  In any case, <strong>this pretty much confirms that the font-path is the issue.</strong></p>
  <p>I'm trying to generate PDF-files with tFPDF.<br>
  When I run my code on a local server, it works perfectly, but when I upload it to my webhost, it starts acting up.<br>
  The first issue that I encountered was that <code>ttfonts.php</code> gave me an error that stated that it could not open a certain font file, which it was for some reason trying to find in my local directory rather than the online one. I have no idea why it would do this, but in an attempt to fix it, I defined the <code>FPDF_FONTPATH</code> php constant to multiple different versions of the online servers filepath as instructed by the guide on fpdf's website. All of them resulted in 1 of 2 outcomes:<br><br></p>
  <ol>
  <li><p>I would get the same error, somehow still with the local file path rather than the defined constant.<br></p>
  </li>
  <li><p>I would just get a blank page in the php file that contains the code (not a blank pdf).<br><br>
  The second outcome could imply that the font folder path problem was solved but that a second problem emerged behind it. Or it could just imply that the defined constant was failing to read on the server.
  <br>
  It is worth noting that the reason I need tFPDF and this particular unifont is that I wanted a font that had the danish letters &quot;æøå&quot; and didn't look extremely pixelated.<br>
  I have no idea where in the process this problem is occurring, and without an error I am lost as to where to look. I tried changing the permissions of the php file to allow it to write, but that didn't help either.<br><br>
  Maybe I am overlooking some extremely basic issue, maybe I'm not. In either case, here's the php code minus the page &quot;content&quot;:</p>
  <pre><code>&lt;?php
  define('FPDF_FONTPATH','home/USERNAME/public_html/WEBSITENAME/intra/paycheck2/font');
  require('paycheck2/tfpdf.php');
  $pdf = new tFPDF();
  $pdf-&gt;AddPage();
  $pdf-&gt;AddFont('DejaVu','','DejaVuSans.ttf',true);
  $pdf-&gt;AddFont('DejaVuB','','DejaVuSans-Bold.ttf',true);
  $pdf-&gt;SetFont('DejaVu','',9);
  $pdf-&gt;Image('images/IMAGENAME1.png',10,10,-130);
  $pdf-&gt;Image('images/IMAGENAME2.png',50,11,-100);
  
  //(Text content code here)
  
  $pdf-&gt;Output();
  ?&gt;
  </code></pre>
  </li>
  </ol>
  <p>I included the images just in case the paths of these could have some significance. Other than that its just text using a few php variables here and there.<br>
  The filepath in the above example results in a blank page (result 2), other attempted filepaths include:</p>
  <pre><code>define('FPDF_FONTPATH','public_html/WEBSITENAME/intra/paycheck2/font');
  //Blank page result (2)
  define('FPDF_FONTPATH','/paycheck2/font');
  //Blank page result (2)
  define('FPDF_FONTPATH','paycheck2/font');
  //Can't open file C:\wamp\www\SITENAME\paycheck2/font/unifont/DejaVuSans.ttf
  //Result 1; the error code containing my local URL, which is also given when no constant is specified. Likely a sign that the constant was rejected.
  </code></pre>
  <p>I tried more variations, but like I said, they all resulted in one of these 2 outcomes. Does anyone have any idea what to do about this?</p>