If you are getting an error message saying that your PDF file is corrupt after you downloaded an Invoice or Estimate PDF, then you might need to change the folder /dompdf/lib/fonts/ to be writable (777 permissions). The reason is that your server needs to temporary save the compiled font to this folder and if it has no writing permissions the PDF creation will fail and the result is a corrupt PDF document.