2 votes

redirect to download pdf in FPDF output

My question is, and I hope you can answer it.

I am using the fpdf library in which when I click on the send button, it redirects me to the PDF and downloads it, the problem is that when I use the

$pdf->Output('D','entradamateriaPrima.pdf');

I can no longer use the Windows location or the header Could someone explain me a way to force a download and redirect in the FPDF library.

2voto

Talan Points 31

To download and view the file you must use the following:

$pdf->Output('FI','entradamateriaPrima.pdf');

1 votes

What does 'FI' mean? What does this parameter do?

1 votes

Output in this link you will find all the parameters used by the Output function.

1 votes

@Villatoro "F" - Saves the file on the server and "I" - Displays the file in the browser. There are other options that can be found in the documentation: fpdf.org/doc/output.htm

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X