no its not right
writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true);
so in your case, and im guessing some what:
$pdf->writeHTMLCell(0,0,0,0 "Job Number ". $_POST["jobnum"]);
Question
Is this the correct way to "post" my data from a html form?
$pdf->writeHTMLCell($html="Job Number", $_POST["jobnum"], true, false, true, false, '', $in=1);
as of right now my pdfcreate.php action just goes to a blank page.
still not getting a response from tcpdf... Im not really sure what I am doing wrong here..
<?php
// Include the main TCPDF library (search for installation path).
require_once('wwwroot/tcpdf/tcpdf.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetTitle('proto_addendum');
$pdf->SetSubject('jobnum');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 01', PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// ---------------------------------------------------------
// IMPORTANT: disable font subsetting to allow users editing the document
$pdf->setFontSubsetting(false);
// set font
$pdf->SetFont('helvetica', '', 10, '', false);
// add a page
$pdf->AddPage();
//data
$pdf->writeHTMLCell(0,0,0,0, "Job Number ", $_POST["jobnum"]);
$pdf->writeHTMLCell(0,0,0,0, "Program ", $_POST["program"]);
$pdf->writeHTMLCell(0,0,0,0, "Ship Date ", $_POST["shipdate"]);
$pdf->writeHTMLCell(0,0,0,0, "Description ", $_POST["description"]);
$pdf->writeHTMLCell(0,0,0,0, "Proto Verified By ", $_POST["name"]);
$pdf->writeHTMLCell(0,0,0,0, "Additional Notes ", $_POST["notes"]);
$pdf->writeHTMLCell(0,0,0,0, "File Name", $_POST["filename1"]);
$pdf->writeHTMLCell(0,0,0,0, "Doc Siize ", $_POST["Docsize1"]);
$pdf->writeHTMLCell(0,0,0,0, "FC ", $_POST["fc1"]);
$pdf->writeHTMLCell(0,0,0,0, "DC ", $_POST["dc1"]);
$pdf->writeHTMLCell(0,0,0,0, "Flip ", $_POST["flip1"]);
$pdf->writeHTMLCell(0,0,0,0, "Quantity ", $_POST["quantity1"]);
$pdf->writeHTMLCell(0,0,0,0, "Flip Quantity ", $_POST["flipqty1"]);
// Add Javascript code
$pdf->IncludeJS($js);
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('original.pdf', 'D');
?>
Solution
no its not right
writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true);
so in your case, and im guessing some what:
$pdf->writeHTMLCell(0,0,0,0 "Job Number ". $_POST["jobnum"]);