Hi, How can I convert a dynamic web page to pdf?

Posted by Jemma Diampuan on Stack Overflow See other posts from Stack Overflow or by Jemma Diampuan
Published on 2010-04-09T03:32:44Z Indexed on 2010/04/09 3:33 UTC
Read the original article Hit count: 382

Filed under:

I have a dynamic webpage that I created using html and php... I already have sample codes that can convert a static web page to pdf... But my problem is my web page is dynamic... So is there a way to convert my page to pdf? If yes, please provide some easy to understand codes... thank... Anyway, here is my code:

//session variable
$userID = 1;

$receipt = &new Receipt();
$receipt->queryReceiptInfo($userID);
$receiptID = $receipt->getReceiptID();
$receiptIssueDate = $receipt->getReceiptIssueDate();
$customer = $receipt->getCustomer();
$salesID = $receipt->getSalesID();

$salesDetail = &new SalesDetail($salesID);
$salesDetails = $salesDetail->viewSalesDetail();

//session variable
$businessID = 1;
$business = &new Business('', $businessID);
$business->queryBusinessName();
$businessName = $business->getBusinessName();

$rows = sizeof($salesDetails);
$columns = sizeof($salesDetails[0]);

?>

Receipt No. Date Issued Business Customer Item Quantity Sub-Total "; for($j = 0; $j ".$salesDetails[$i][$j].""; } $totalPrice += (double)$salesDetails[$i][2]; echo ""; } ?> Total Price

© Stack Overflow or respective owner

Related posts about html2pdf