fpdm icon indicating copy to clipboard operation
fpdm copied to clipboard

Output on Front End

Open dskurth opened this issue 1 year ago • 1 comments

I have succesfully used this library within the backend (dashboard )of a wordpress enviornment. Now I need to create the same PDF, that a user can click on a button and it either displays the PDF file (like in the backend) or allow it to be downloaded. I have tried all the different parameters of Output() as follows:

ob_clean(); $pdf->Output(); // Does nothing

ob_clean(); $pdf->Output('I', ''); // OPENS IN SAME PAGE

ob_clean(); $pdf->Output('D', 'test.pdf'); // Opens file save and then hangs. $pdf->Output('D', ''); // Opens file save and then hangs.

ob_clean(); $pdf->Output('F', 'test.pdf'); // Should save file, does nothing

How do I achieve this?

dskurth avatar Nov 07 '24 22:11 dskurth