Hi,
Is it possible to convert my website from HTML form to a PDF page and it will be saved on the server after submitting?
Is it possible to convert my website from HTML form to a PDF page and it will be saved on the server after submitting?
[B][COLOR="#FF0000"]You require 'pdfcrowd.php';[/COLOR][/B] [COLOR="#008000"]// create an API client instance[/COLOR] $client = new Pdfcrowd("username", "apikey"); [COLOR="#008000"]// convert a web page and store the generated PDF into a variable[/COLOR] $pdf = $client->convertURI('http://www.google.com/'); [COLOR="#008000"]// set HTTP response headers[/COLOR] header("Content-Type: application/pdf"); header("Cache-Control: max-age=0"); header("Accept-Ranges: none"); header("Content-Disposition: attachment; filename=\"google_com.pdf\""); [COLOR="#008000"]// send the generated PDF[/COLOR] echo $pdf;
require('fpdf.php'); $pdf = new FPDF(); $pdf->AddFont('georgia', '', 'georgia.php'); $pdf->AddFont('georgia', 'B', 'georgiab.php'); $pdf->AddFont('georgia', 'I', 'georgiai.php'); # Add UTF-8 support (only add a Unicode font) $pdf->AddFont('freesans', '', 'freesans.php', true); $pdf->SetFont('freesans', '', 12); $pdf->SetTitle('My title'); $pdf->SetAuthor('My author'); $pdf->SetDisplayMode('fullpage', 'single'); $pdf->SetLeftMargin(20); $pdf->SetRightMargin(20); $pdf->AddPage(); $pdf->Cell(40,10,'Hello World!'); $pdf->Output();
Comment