Change dompdf to preview PDF on browser

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
wungaz
User
Posts: 214

Change dompdf to preview PDF on browser

Post by wungaz »

Where is the setting of Dompdf to preview attached PDF document instead of downloading attachment


arbei
User
Posts: 9355

Post by arbei »

You can update the "Export" function of class "cExportPdf" in phpfn12.php to make the pdf open in browser.

From
$dompdf->stream($gsExportFile . ".pdf", array("Attachment" => 1)); // 0 to open in browser, 1 to download

To
$dompdf->stream($gsExportFile . ".pdf", array("Attachment" => 0)); // 0 to open in browser, 1 to download


nadimsia
User
Posts: 31

Post by nadimsia »

I also change the phpfn13.php as your suggestion but the I get message "The image failed to load."


arbei
User
Posts: 9355

Post by arbei »

nadimsia wrote:
I also change the phpfn13.php as your suggestion but the I get message
"The image failed to load."

Change the View Tag of the field to "TEXT" and try again.


Post Reply