파일을 내보내려고합니다. PDF 에 HTML은 지금은 내가이Shiledui에서 PDF로 내보내기
<script type="text/javascript">
jQuery(function ($) {
$("#pdf").click(function() {
// parse the HTML table element having an id=exportTable
var dataSource = shield.DataSource.create({
data: "#tabledata",
schema: {
type: "table",
fields: {
ID: { type: String },
Owner: { type: Number },
RegNo: { type: String }
}
}
});
// when parsing is done, export the data to PDF
dataSource.read().then(function (data) {
var pdf = new shield.exp.PDFDocument({
author: "PrepBootstrap",
created: new Date()
});
pdf.addPage("a4", "portrait");
pdf.table(
50,
50,
data,
[
{ field: "ID", title: "ID", width: 100 },
{ field: "Owner", title: "Owner", width: 10 },
{ field: "RegNo", title: "RegNo", width: 100 }
],
{
margins: {
top: 50,
left: 50
}
}
);
pdf.saveAs({
fileName: "PrepBootstrapPDF"
});
});
});
});
을하려고 할 때 이제 테이블에 표시 성공적으로 JQuery와 및 webstatic 방법
데이터를 HTML 테이블을 채울 수있다 시도 PDF 파일을 다운로드하고 성공적으로 PDF 파일로 내보내기 지금 이미지를 PDF로 저장하고 싶습니다. and title of PDF 어떻게해야합니까?