Skip to content
Advertisement

Create pdf with DOM PDF outside DOMpdf directory

Hi I have mybb installed on my website. I have also installed dompdf and its working in its own directory i.e. I have installed in "DOM" directory. Now I can easily general pdfs with this simple code , keeping in the "DOM" directory.

JavaScript

If I try to access other file that is out the director DOM i.e.

load_html_file($file); $dompdf->render(); $dompdf->stream(“sample.pdf”);

?> I receive error Remote file requested, but DOMPDF_ENABLE_REMOTE is false

Advertisement

Answer

To load html without enabling remote file access:

JavaScript

To enable remote file access:

Taken from dompdf_config.inc.php

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement