1

I use ui-grid export pdf , but the last column always get cut in half. No matter what page size I set.

I search around, some one said, set exporterPdfOrientation: 'landscape', at

 $scope.gridOptions = { ...  exporterPdfOrientation: 'landscape', ...}

It does not work for me.

enter image description here

hoogw
  • 4,982
  • 1
  • 37
  • 33

1 Answers1

1

After many try: I found the solution is decrease exporterPdfMaxGridWidth: 600,

exporterPdf configuration source code

exporterPdf pagesize

 $scope.gridOptions = {
    exporterPdfOrientation: 'landscape',
     exporterPdfPageSize:'A4',  // exporterPdfMaxGridWidth = Defaults to 720 (for A4 landscape), use 670 for LETTER
    // page size see --- https://github.com/bpampuch/pdfmake/blob/master/src/standardPageSizes.js

   exporterPdfMaxGridWidth: 600,    // bug, for A4, default is 720, set to 600 solve my problem.                    

here is result, no more cut column enter image description here

hoogw
  • 4,982
  • 1
  • 37
  • 33