7
HTML表結構jQuery的 - 導出HTML表樹狀結構PDF/Excel中
<table width="100%" border="0" name="tableID" id="activity" class="table table-striped">
<thead>
<tr>
<th style="height:24px !important" class="ui-state-default ui-th-column ui-th-ltr">Name</th>
<th class="ui-state-default ui-th-column ui-th-ltr">Category</th>
<th class="ui-state-default ui-th-column ui-th-ltr">Created</th>
<th class="ui-state-default ui-th-column ui-th-ltr">Status</th>
<th class="ui-state-default ui-th-column ui-th-ltr">Hours</th>
<th class="ui-state-default ui-th-column ui-th-ltr">Action</th>
</tr>
</thead>
<tbody><tr style="border:1px solid #ccc"><td style="border:1px solid #ccc"><span style="font-weight:bold;font-size:13px;padding-left:20px;color:#ff7a85">Development</span></td><td style="border:1px solid #ccc">Development</td><td style="border:1px solid #ccc">John Doe</td><td style="border:1px solid #ccc">Active</td><td style="border:1px solid #ccc">0</td><td style="border:1px solid #ccc"><a href="http://10.103.3.96/timesheet_bijal/manage/edittask/index?project_id=478&id=130">Edit</a>/<a onclick="delete_task(130,0,478)" style="cursor:pointer">Deactivate</a> </td></tr><tr style="border:1px solid #ccc"><td style="border:1px solid #ccc"><span style="font-weight:bold;font-size:13px;padding-left:40px;color:#0074a2">Bug fixing</span></td><td style="border:1px solid #ccc">Development</td><td style="border:1px solid #ccc">John Doe</td><td style="border:1px solid #ccc">Active</td><td style="border:1px solid #ccc">120</td><td style="border:1px solid #ccc"><a href="http://10.103.3.96/timesheet_bijal/manage/edittask/index?project_id=478&id=131">Edit</a>/<a onclick="delete_task(131,130,478)" style="cursor:pointer">Deactivate</a> </td></tr><tr style="border:1px solid #ccc"><td style="border:1px solid #ccc"><span style="font-weight:bold;font-size:13px;padding-left:60px;color:#33B940">dev2</span></td><td style="border:1px solid #ccc">Development</td><td style="border:1px solid #ccc">John Doe</td><td style="border:1px solid #ccc">Active</td><td style="border:1px solid #ccc">100</td><td style="border:1px solid #ccc"><a href="http://10.103.3.96/timesheet_bijal/manage/edittask/index?project_id=478&id=9309">Edit</a>/<a onclick="delete_task(9309,131,478)" style="cursor:pointer">Deactivate</a> </td></tr><tr style="border:1px solid #ccc"><td style="border:1px solid #ccc"><span style="font-weight:bold;font-size:13px;padding-left:80px;color:#ffa62f">dev3</span></td><td style="border:1px solid #ccc">Development</td><td style="border:1px solid #ccc">John Doe</td><td style="border:1px solid #ccc">Inactive</td><td style="border:1px solid #ccc">100</td><td style="border:1px solid #ccc"><a href="http://10.103.3.96/timesheet_bijal/manage/edittask/index?project_id=478&id=9310">Edit</a> </td></tr><tr style="border:1px solid #ccc"><td style="border:1px solid #ccc"><span style="font-weight:bold;font-size:13px;padding-left:60px;color:#33B940">task2</span></td><td style="border:1px solid #ccc">Development</td><td style="border:1px solid #ccc">John Doe</td><td style="border:1px solid #ccc">Active</td><td style="border:1px solid #ccc">100</td><td style="border:1px solid #ccc"><a href="http://10.103.3.96/timesheet_bijal/manage/edittask/index?project_id=478&id=9311">Edit</a>/<a onclick="delete_task(9311,131,478)" style="cursor:pointer">Deactivate</a> </td></tr><tr style="border:1px solid #ccc"><td style="border:1px solid #ccc"><span style="font-weight:bold;font-size:13px;padding-left:40px;color:#0074a2">Development</span></td><td style="border:1px solid #ccc">Development</td><td style="border:1px solid #ccc">John Doe</td><td style="border:1px solid #ccc">Active</td><td style="border:1px solid #ccc">60</td><td style="border:1px solid #ccc"><a href="http://10.103.3.96/timesheet_bijal/manage/edittask/index?project_id=478&id=133">Edit</a>/<a onclick="delete_task(133,130,478)" style="cursor:pointer">Deactivate</a> </td></tr><tr style="border:1px solid #ccc"><td style="border:1px solid #ccc"><span style="font-weight:bold;font-size:13px;padding-left:60px;color:#33B940">testing1</span></td><td style="border:1px solid #ccc">Development</td><td style="border:1px solid #ccc">John Doe</td><td style="border:1px solid #ccc">Active</td><td style="border:1px solid #ccc">100</td><td style="border:1px solid #ccc"><a href="http://10.103.3.96/timesheet_bijal/manage/edittask/index?project_id=478&id=9312">Edit</a>/<a onclick="delete_task(9312,133,478)" style="cursor:pointer">Deactivate</a> </td></tr><tr style="border:1px solid #ccc"><td style="border:1px solid #ccc"><span style="font-weight:bold;font-size:13px;padding-left:40px;color:#0074a2">dev1</span></td><td style="border:1px solid #ccc">Development</td><td style="border:1px solid #ccc">John Doe</td><td style="border:1px solid #ccc">Active</td><td style="border:1px solid #ccc">100</td><td style="border:1px solid #ccc"><a href="http://10.103.3.96/timesheet_bijal/manage/edittask/index?project_id=478&id=9308">Edit</a>/<a onclick="delete_task(9308,130,478)" style="cursor:pointer">Deactivate</a> </td></tr></tbody></table>
<table>
<tr id="footerExport">
<td id="exportpdf"><img src="https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/128/pdf.png" title="Export to PDF" /></td>
</tr>
</table>
爲HTML 包括jQuery的腳本表導出
http://ngiriraj.com/pages/htmltable_export/demo.php
以下項目任務中列出下降親子關係,如下所示樹狀結構
以下小提琴以PDF格式導出數據,但不知何故樹視圖不會維護。
1)我怎樣才能顯示其所附的圖像保持樹視圖和任務順序中顯示PDF格式的數據?
2)點擊小提琴中的PDF圖標顯示Firefox中的輸出,而不是Chrome中的輸出。
3)如果不使用任何插件,我怎樣才能以PDF/Excel格式導出顯示的HTML結構,並維護樹視圖?
在瀏覽器URL,它是在 數據先來看看:應用/ PDF格式; BASE64, 格式,你可以使用也Nreco PDF生成器 –
@AmitSengar,我已經使用了插件作爲在鏈接中提到。此外,如果你可以發佈一些片段解釋你的關注,將是偉大的 – Slimshadddyyy
你必須在你的情況下打開新的窗口,你不想使用這個插件,那麼你可以使用Nreco PDF生成器使PDF(可能是一個選項您)。 chk這個「http://fiddle.jshell.net/jWAJ7/1139/show/」 –