PHP: automatically save dynamic PDF file to a remote server using DOMPDF

I use the dompdf library to create my own PDF spreadsheet file, and I can view it online, or I can upload it to a folder of your choice.

But what I would like to do is save it to a remote server (I do not need to save it to users' PCs), for example, automatically upload a script that will create a file and then upload it to a remote server, so I can use it later him in his application later.

you can specify the file $ _FILES ["file"] script so to speak to get the php page that creates the pdf, and then load it from there.

+5
source share
4 answers

, , . , . chmod.

$html.

$dompdf->load_html($html);    
$dompdf->render();
$pdf = $dompdf->output();
$file_location = $_SERVER['DOCUMENT_ROOT']."app_folder_name/pdfReports/".$pdf_name.".pdf";
file_put_contents($file_location,$pdf); 

pdfReports - , PDF . .

+15

PDF , , ? , wkhtmltppdf HTML- PDF / .

http://code.google.com/p/wkhtmltopdf/

0
0
source

All Articles