Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

save a PDF file to a directory using mPDF [duplicate]

Tags:

php

mpdf

I have a question regarding the PDF files.I have written the code in order to open a PDF, i manage to output the context in the browser but i want also this PDF file to be saved in a directory.

Does anyone know how i will do it?

I can post the code if you think this will be helpful for you.

Thank you in advance, Sachin

like image 570
umasachin Avatar asked Aug 21 '12 11:08

umasachin


1 Answers

Quote from stackoverflow:

Docs state that the first argument of Output() is the file path, second is the savng mode - you need to set it to 'F'.

$mpdf->Output('filename.pdf','F');
like image 57
Djave Avatar answered Nov 14 '22 23:11

Djave