Hi, How can I convert a dynamic web page to pdf?
- by Jemma Diampuan
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