I'm trying to create a pdf in my server but does not work, but in local server works...
Thec ode is simple, I´m starting and I only want to check if the pdf is created before starting with css and collect the rest of form data.
I have the pdf content in a file called: print_view.php
This is the code in php form
<?php
require 'vendor/autoload.php';
use Spipu\Html2Pdf\Html2Pdf;
if (isset($_POST['crear'])){
//cokkect the content of the pdf
ob_start();
require 'print_view.php';
$html=ob_get_clean();
$html2pdf=new Html2Pdf('P','A4','es','true','UTF-8');
$html2pdf->writeHTML($html);
ob_end_clean();
I'm trying to create a pdf in my server but does not work, but in local server works...
Thec ode is simple, I´m starting and I only want to check if the pdf is created before starting with css and collect the rest of form data.
I have the pdf content in a file called: print_view.php This is the code in php form
<?php require 'vendor/autoload.php'; use Spipu\Html2Pdf\Html2Pdf;
if (isset($_POST['crear'])){
//cokkect the content of the pdf ob_start(); require 'print_view.php'; $html=ob_get_clean(); $html2pdf=new Html2Pdf('P','A4','es','true','UTF-8'); $html2pdf->writeHTML($html); ob_end_clean();
$html2pdf->writeHTML($html); $html2pdf->output('factura_proforma_Papeleria_Molina.pdf'); } . . . .