I'm using fpdf to generate my invoice.
so the problem is whenever I open the link the file downloading automatically ..
I want to print the file when I click on the link...
I have tried onclick="print();"
but its printing the HTML page
the link :
echo "<th><a href='invoices.php?source=print_invoice&inv_id=$inv_id'>print</a></th>";
I also tried using I
in $pdf->Output('invoice.pdf','I');
not working also ...
edit :
I tried this Script But is not working
I get these two errors :
Notice: Constant FPDF_VERSION already defined
Fatal error: Cannot redeclare class FPDF
Is it possible to display the print dialog with the pdf from the link when I click the print?