hi,
i created this code a long time ago and during that time i had all the info i needed to do a save as PDF but now its all gone and the client wants that option so no one can change it.
code below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<title>Invoice</title>
<link rel='stylesheet' type='text/css' href='css/style.css' />
<link rel='stylesheet' type='text/css' href='css/print.css' media="print" />
<script type='text/javascript' src='js/jquery-1.3.2.min.js'></script>
<script type='text/javascript' src='js/example.js'></script>
</head>
<body>
<div id="page-wrap">
<textarea id="header">INVOICE</textarea>
<div id="identity">
<textarea id="address">Company Address</textarea>
<div id="logo">
<div id="logoctr">
<a href="javascript:;" id="change-logo" title="Change logo">Change Logo</a>
<a href="javascript:;" id="save-logo" title="Save changes">Save</a>
|
<a href="javascript:;" id="delete-logo" title="Delete logo">Delete Logo</a>
<a href="javascript:;" id="cancel-logo" title="Cancel changes">Cancel</a>
</div>
<div id="logohelp">
<input id="imageloc" type="text" size="50" value="" /><br />
(max width: 540px, max height: 100px)
</div>
<img id="image" src="images/logo.png" alt="logo" />
</div>
</div>
<div style="clear:both"></div>
<div id="customer">
<textarea id="customer-title">Client details
go here</textarea>
<table id="meta">
<tr>
<td class="meta-head">Invoice #</td>
<td><textarea>000123</textarea></td>
</tr>
<tr>
<td class="meta-head">Date</td>
<td><textarea id="date">December 15, 2009</textarea></td>
</tr>
<tr>
<td class="meta-head">Amount Due</td>
<td><div class="due">£875.00</div></td>
</tr>
</table>
</div>
<table id="items">
<tr>
<th>Item</th>
<th>Description</th>
<th>Unit Cost</th>
<th>Quantity</th>
<th>Price</th>
</tr>
<tr class="item-row">
<td class="item-name"><div class="delete-wpr"><textarea>Pickup</textarea><a class="delete" href="javascript:;" title="Remove row">X</a></div></td>
<td class="description"><textarea>Type here</textarea></td>
<td><textarea class="cost">£650.00</textarea></td>
<td><textarea class="qty">1</textarea></td>
<td><span class="price">£650.00</span></td>
</tr>
<tr class="item-row">
<td class="item-name"><div class="delete-wpr"><textarea>Destination</textarea><a class="delete" href="javascript:;" title="Remove row">X</a></div></td>
<td class="description"><textarea>Type Here</textarea></td>
<td><textarea class="cost">£75.00</textarea></td>
<td><textarea class="qty">1</textarea></td>
<td><span class="price">£225.00</span></td>
</tr>
<tr class="item-row">
<td class="item-name"><div class="delete-wpr"><textarea>Waiting Time</textarea><a class="delete" href="javascript:;" title="Remove row">X</a></div></td>
<td class="description"><textarea>Type Here</textarea></td>
<td><textarea class="cost">£75.00</textarea></td>
<td><textarea class="qty">1</textarea></td>
<td><span class="price">£225.00</span></td>
</tr>
<tr id="hiderow">
<td colspan="5"><a id="addrow" href="javascript:;" title="Add a row">Add a row</a></td>
</tr>
<tr>
<td colspan="2" class="blank"> </td>
<td colspan="2" class="total-line">Subtotal</td>
<td class="total-value"><div id="subtotal">£875.00</div></td>
</tr>
<tr>
<td colspan="2" class="blank"> </td>
<td colspan="2" class="total-line">Total</td>
<td class="total-value"><div id="total">£875.00</div></td>
</tr>
<tr>
<td colspan="2" class="blank"> </td>
<td colspan="2" class="total-line">Amount Paid</td>
<td class="total-value"><textarea id="paid">£0.00</textarea></td>
</tr>
<tr>
<td colspan="2" class="blank"> </td>
<td colspan="2" class="total-line balance">Balance Due</td>
<td class="total-value balance"><div class="due">£875.00</div></td>
</tr>
</table>
<div id="terms">
<h5>Terms</h5>
<textarea>NET 30 Days. Finance Charge of 1.5% will be made on unpaid balances after 30 days.</textarea>
</div>
</div>
</body>
</html>
can anyone help to put a button on the bottom of the page to Save to PDF so they can email it electronically or even send it via the page itself.
i have looked at other forums, that suggested htmltopdf etc but i couldnt adapt it to the website as i would have intended it to be.
any help is greatfully appreciated.
thanks