1
,如果我得到這樣的列數據與而導出爲PDF,列內容超過uigrid列邊框angularjs
之間$scope.gridOptions.data = [{"name":"rasheedsyedabdulhameed"}];
沒有空間,這是我gridoptions
$scope.gridOptions = {
columnDefs: [
{ field: 'name' },
{ field: 'name' },
{ field: 'name' }
],
enableGridMenu: true,
enableSelectAll: true,
exporterCsvFilename: 'myFile.csv',
exporterPdfDefaultStyle: {fontSize: 9},
exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
exporterPdfFooter: function (currentPage, pageCount) {
return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
},
exporterPdfCustomFormatter: function (docDefinition) {
docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
return docDefinition;
},
exporterPdfOrientation: 'landscape',
exporterPdfPageSize: 'LETTER',
exporterPdfMaxGridWidth: 500,
exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
onRegisterApi: function(gridApi){
$scope.gridApi = gridApi;
}
} ;
在導出爲PDF表中的內容超過了列邊框,這是我的例子plunker just a sample
找到這個例子非常有用,特別是頁腳/標題屬性。 –