2017-04-17 3 views
0

AngularJS 내에서 pdfmake를 사용하여 헤더를 pdf로 내보낼 수있었습니다.
exporterPdfHeader 사용.UI-Grid 내보내기 - 두 개의 별도 헤더 내보내기

$scope.gridOptions.exporterPdfHeader = { 

     margin: [30, 5, 30, 10], 

     table: {  
      widths: [ '*', '*', '*' ], 

      body: [ 

       [ 'Region: ' + $scope.region, 'Group: ' + $scope.group, 'MC: ' + $scope.mc /*, 'The last one'*/ ], 
       [ 'District #: ' + $scope.district, 'Route #: ' + $scope.route, 'Week Ending Date: ' + $scope.weekEndDate, /*, 'Value 4' */],  


      ] 


      } 

    }; 

지금 제가하고 싶은 것은 그것의 내부 이미지의 또 다른 헤더를 내보낼 수 있습니다 : 여기

는 코드입니다. 나는이 헤더 내에서 둘 다 할 수 없다. 다른 별도의 헤더를 내보낼 수있는 방법이 있습니까? 또는이 헤더 안의 이미지를 별도의 행으로 만드시겠습니까? 다른 gridOptions을 만들 수 있습니까? (gridOptions2). 어떤 도움이라도 도움이 될 것입니다.

답변

0

칼럼 내에서 ui-grid를 내보낼 때 다른 헤더를 만들 수있었습니다.

$scope.gridOptions.exporterPdfHeader = {   
      columns: [ 
       {   
       margin: [206, 0, 0, 0], 

       image: //long url, 
       width: 200, 
       height: 58,     
       }, 
       { 
       margin: [ -160, 60, 33, 0 ], 

       table: {       
        widths: [ '*', '*', '*' ], 

        body: [ 

         [ ], 
        ]   

        } 

       } 
      ]    
    };